Changes between Initial Version and Version 1 of PiBotDev


Ignore:
Timestamp:
Sep 20, 2016, 11:12:56 PM (9 years ago)
Author:
aborgwardt
Comment:

Cut-n-paste from a Google Document -- Still needs a lot of formatting...

Legend:

Unmodified
Added
Removed
Modified
  • PiBotDev

    v1 v1  
     1PiBot Development Environment Notes (under construction...)
     2
     3This is a description of the development environment used by one of the mentors (Mr. Alan Borgwardt) for initial PiBot development / prototyping in Fall 2016.
     4
     5- Windows 10
     6- Eclipse Mars 2 (eclipse-java-mars-2)
     7- JDK 8 (jdk-8u102-windows)
     8- Bonjour (used for Pi Zero Ethernet-over-USB support)
     9- Pi4J (pi4j-1.1.zip)
     10    http://pi4j.com/install.html
     11        - Read the first paragraph (re: Pi .vs. dev host installation)
     12        - Follow the 'download' link in the first paragraph
     13        - Download pi4j-1.1.zip
     14        - Extract zip
     15        - Add jar files from extracted lib folder to Eclipse project
     16    NOTE: This is for development workstation. Pi Zero's Raspian Jessie already has PI4J included, which, I think, is what gets used when running on Pi Zero. (Although, launching on Pi Zero from Windows/Eclipse with Pi Plugin *may* use the jars from the Eclipse project???)
     17
     18- LaunchPi Plugin
     19
     20    - Open Eclipse
     21    - Select menu item: "Help|Install New Software..."
     22    - In the "Work with:" text box, enter the following URL:
     23        https://raw.githubusercontent.com/tsvetan-stoyanov/launchpi/master/org.launchpi.us/target/site/site.xml
     24    - Select the "LaunchPI" item from the "Uncategorized" entry
     25    - Proceed through the wizard to add/install this plugin
     26
     27    NOTE: For more about this plugin, visit the URL:
     28        http://tsvetan-stoyanov.github.io/launchpi/
     29
     30    NOTE: When the Pi Zero is connected to the USB port on my Windows system, it is automatically identified as hostname 'raspberrypi.local'.
     31
     32- PuTTY
     33
     34    I use PuTTY to SSH into the Pi Zero from Windows:
     35   
     36        Connection type: SSH
     37        hostname: raspberrypi.local
     38        username: pi
     39        password: raspberry
     40- WinSCP
     41
     42    I use WinSCP transfer files between Windows and the Pi Zero.
     43
     44        Same connection information used for PuTTY
     45
     46
     47- Run a program at startup of Pi/Raspian:
     48
     49    Check out the following URLs for examples and reference information:
     50
     51    http://www.mikeslab.net/?p=176
     52http://wiki.debian.org/LSBInitScripts
     53
     54Highlights:
     55
     56        NOTE: Use ‘sudo’ to perform these operations as root in a Raspbian shell…
     57
     58Create an LSB style init script for launching a PiBot autonomous startup app. I copied rc.local as a starting point and modified it to run my desired PiBot app as follows:
     59sudo cp /etc/init.d/rc.local /etc/init.d/pibot_auto
     60sudo vi /etc/init.d/pibot_auto
     61Revise the header block to describe PiBot autonomous app
     62Revise the do_start() to launch the PiBot autonomous app
     63Save and exit editor
     64Test/debug the script until it works as desired using these commands:
     65sudo /etc/init.d/pibot_auto start
     66sudo /etc/init.d/pibot_auto stop
     67sudo /etc/init.d/pibot_auto restart
     68When working as desired, register script to run at startup/shutdown:
     69sudo update-rc.d pibot_auto defaults
     70If the script is changed (edited) after registering, a ‘reload’ may be necessary as follows:
     71sudo systemctl daemon-reload
     72To unregister the script (i.e., stop it from running at startup/shutdown):
     73sudo update-rc.d -f pibot_auto remove
     74
     75
     76- Configuring WIFI on Pi Zero:
     77
     78Follow the instructions on the following web page to set up wifi on the Pi Zero:
     79
     80https://thepihut.com/blogs/raspberry-pi-tutorials/83502916-how-to-setup-wifi-on-raspbian-jessie-lite
     81
     82    NOTE: You can make these edits from another Linux system by inserting the Pi Zero’s MicroSD memory card. This will allow you to go straight to configuring the Pi Zero for wifi without having to get the SSH-over-USB configured.
     83
     84    NOTE: You will need the SSID and associated password for the WIFI network to which the Pi Zero will be connecting. It is also helpful to have access to the WIFI router admin page to verify when the Pi Zero connects and what IP Address is assigned by DHCP. Static IP configuration should be possible, but I was not successful in my attempts to get it working.