Changes between Version 60 and Version 61 of PiBotOsInstallation


Ignore:
Timestamp:
Oct 14, 2016, 11:47:34 PM (9 years ago)
Author:
David Albert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PiBotOsInstallation

    v60 v61  
    5151  sudo cp -r build/deviceio/lib/* $JAVA_HOME/jre/lib
    5252}}}
    53 * Test Device I/O following [https://gautric.github.io/blog/2016/03/09/rhiot-Device-IO-API-i2cdetect-impl.html these directions]
     53* Test Device I/O following [https://gautric.github.io/blog/2016/03/09/rhiot-Device-IO-API-i2cdetect-impl.html these directions] or [https://dzone.com/refcardz/iot-applications-with-java-and-raspberry-pi these].  Projects must be linked with build/jar/dio.jar and reference the appropriate policy files.  For example, to run a program:
     54{{{ sudo java -Djava.security.policy=./java.policy -classpath .:./dio.jar  -Djdk.dio.registry=./dio.properties DioLed }}}.  An example java.policy is:
     55{{{
     56   // grant all permissions for the DIO framework
     57   grant {
     58       permission jdk.dio.DeviceMgmtPermission "*:*", "open";
     59       permission jdk.dio.gpio.GPIOPinPermission "*:*", "open,setdirection";
     60       permission jdk.dio.gpio.GPIOPortPermission "*:*";
     61       permission jdk.dio.i2cbus.I2CPermission "*:*";
     62       permission jdk.dio.spibus.SPIPermission "*:*";
     63       permission jdk.dio.uart.UARTPermission "*:*";
     64   };
     65}}}
     66
    5467
    5568* Install [https://www.nano-editor.org/ Nano] text editor {{{sudo apt-get install nano}}}