Hi AI Linke,   Thank you for posting your helpful tutorial.  I have an 
IOIO-OTG and am thinking of getting a RPi 3B to help with other processing. 
 Have you played with Pi4J?  http://pi4j.com/


On Sunday, January 12, 2014 at 4:57:28 PM UTC-5, Al Linke wrote:
>
> Hey everyone, wanted to share that with the new V5 Library Ytai has just 
> released, IOIO now works with the Raspberry Pi! This will ONLY work with 
> new V5 library so be sure and upgrade prior.
>
> I've got this up and running on my project now, video here 
> <http://www.youtube.com/watch?v=GphJJjnksrc>. 
>
> You'll see a custom IOIO board in the video but it will work the same 
> using a stock IOIO board. In this setup, the Pi is connected to the IOIO 
> over USB. I didn't spend much time on Bluetooth yet but I think it would 
> work over Bluetooth too.
>
> *Raspberry Pi Setup over USB*
>
> Step 1. Download the latest Raspberry Pi SD card image from 
> http://www.raspberrypi.org/downloads and install Raspbian
>
> Step 2. Download the udev rules file from this page 
> <https://github.com/ytai/ioio/wiki/Downloads>, and copy it to your rules 
> directory (one time step)
> *sudo cp 50-ioio.rules /etc/udev/rules.d*
> Then restart udev
> *sudo restart udev*
> *or*
> *sudo /etc/init.d/udev restart *
> Step 3. Plug your IOIO into a free USB port on the Raspberry Pi and check 
> if it’s recognized using this command
> *ls /dev/IOIO**
> Most likely you'll get back either IOIO0 or IOIO1
>
>  
>
> Step 4. Install Java on your Pi
> *sudo apt-get install openjdk-7-jre*
> Step 5. Now just run your IOIO app from the command line or X windows (
> startx)
>
> java -jar -Dioio.SerialPorts=/dev/IOIO0 yourapp.jar    replace 0 with the 
> number returned from step 3
>
> One funny behavior I saw on the Pi is that when using the command above, 
> it won't work the first time but then works subsequent times. Just do a 
> CTRL-C to cancel and run the command again. However if you use this command 
> and don't force the port like this:
>
> java -jar yourapp.jar 
>
> Then actually it does work the first time but just takes a little longer 
> for the port scans to finish. The theory here from talking with Ytai is 
> that this works because the IOIO lib is opening up the port initially 
> during the port scan when there is no port forced using the 
> -Dioio.SerialPorts=<your port> option.
>
> If you want to set the serial port programmatically in your app, here's 
> how to do that:
>
> call System.setProperty("ioio.SerialPorts", "/dev/IOIOx") from your 
> main(), before calling the "go()" method of your app.
>
> I think the low cost nature of the Pi opens up many cool new applications 
> for IOIO where the Pi can be left embedded in a project. Here's a few 
> things to share to take this further:
>
>
>    - PiUi <http://blog.davidsingleton.org/introducing-piui/>- turns your 
>    Pi in a web server with a mobile friendly UI. The web server back-end is 
>    python based. So you can make a java command line call from Python. 
>    Essentially this setup puts your IOIO on the network where you can control 
>    it from any browser. 
>    
>
>
>    - Google Coder <http://googlecreativelab.github.io/coder/> - Web based 
>    IDE for your Pi, supports javascript and node.js. Similar in concept to 
>    Protocoder <http://makewithmoto.squarespace.com/protocoder/>. Someone 
>    would need to wrap the IOIO libraries in javascript or node.js framework 
> of 
>    Google Coder which would be really awesome, it's a very well done 
>    implementation.
>    
>
> *BeagleBone Black Setup over USB*
>
> Unlike with Raspberry Pi, you’ll login to the BeagleBone Black as root 
> with initially no password. The other difference is that the BeagleBone 
> comes with a Linux distribution pre-installed.
>  
> Step 1. Download the udev rules file from this page 
> <https://github.com/ytai/ioio/wiki/Downloads>, and copy it to your rules 
> directory (one time step)
> *cp 50-ioio.rules /etc/udev/rules.d*
> Then restart udev
> *restart udev*
> *or*
> */etc/init.d/udev restart *
> Step 2. Plug your IOIO into the USB port on the Beagle Bone Black and 
> check if it’s recognized using this command.
> *ls /dev/IOIO**
> Most likely you'll get back either IOIO0 or IOIO1
>
> Step 3. Visit the Oracle JDK download page 
> <http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html>
>  and 
> download the “Linux ARM v6/v7 VFP Soft Float ABI” version. 
>
>    - Copy jdk-7u4X-linux-arm-vfp-sflt.gz to your BeagleBone Black. 
>    Replace X with the latest version of Java available which was 5 at the 
>    time of this writing.
>    - Perform ‘tar xzf jdk-7u4X-linux-arm-vfp-sflt.gz’ to extract the JDK
>    - Perform ‘export PATH=$PATH:/home/root/jdk1.7.0_4X/bin’ to add the 
>    JDK to your path
>    - Perform ‘export JAVA_HOME=/home/root/jdk1.7.0_4X′ to set the 
>    JAVA_HOME on your installation
>    - Perform ‘java -version’ to verify your installation
>
> Step 4. Now just run your IOIO app from the command line or X windows (
> startx).  
>
> java -jar -Dioio.SerialPorts=/dev/IOIO0 yourapp.jar    replace 0 with the 
> number returned from step 3
>
> Unlike on the Pi, you must force the port on the BeagleBone or you'll get 
> exception errors so be sure and use -Dioio.SerialPorts=/dev/IOIO0 
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to