Version 2 (modified by 9 years ago) (diff) | ,
---|
PiBot Development Environment Notes (under construction...)
This is a description of the development environment used by one of the mentors (Mr. Alan Borgwardt) for initial PiBot development / prototyping in Fall 2016.
Windows 10
Eclipse Mars 2 (eclipse-java-mars-2)
JDK 8 (jdk-8u102-windows)
Bonjour (used for Pi Zero Ethernet-over-USB support)
Pi4J (pi4j-1.1.zip)
- Read the first paragraph (re: Pi .vs. dev host installation)
- Follow the 'download' link in the first paragraph
- Download pi4j-1.1.zip
- Extract zip
- Add jar files from extracted lib folder to Eclipse project
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???)
LaunchPi? Plugin
- Open Eclipse
- Select menu item: "Help|Install New Software..."
- In the "Work with:" text box, enter the following URL:
- Select the "LaunchPI" item from the "Uncategorized" entry
- Proceed through the wizard to add/install this plugin
NOTE: For more about this plugin, visit the URL:
NOTE: When the Pi Zero is connected to the USB port on my Windows system, it is automatically identified as hostname 'raspberrypi.local'.
PuTTY
I use PuTTY to SSH into the Pi Zero from Windows:
Connection type: SSH
hostname: raspberrypi.local
username: pi
password: raspberry
WinSCP
I use WinSCP transfer files between Windows and the Pi Zero.
Same connection information used for PuTTY
Run a program at startup of Pi/Raspian?:
Check out the following URLs for examples and reference information:
http://www.mikeslab.net/?p=176 http://wiki.debian.org/LSBInitScripts
Highlights from this page:
NOTE: Use ‘sudo’ to perform these operations as root in a Raspbian shell…
Create 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:
- sudo cp /etc/init.d/rc.local /etc/init.d/pibot_auto
- sudo vi /etc/init.d/pibot_auto
- Revise the header block to describe PiBot autonomous app
- Revise the do_start() to launch the PiBot autonomous app
- Save and exit editor
- Test/debug the script until it works as desired using these commands:
- sudo /etc/init.d/pibot_auto start
- sudo /etc/init.d/pibot_auto stop
- sudo /etc/init.d/pibot_auto restart
When working as desired, register script to run at startup/shutdown:
- sudo update-rc.d pibot_auto defaults
If the script is changed (edited) after registering, a ‘reload’ may be necessary as follows:
- sudo systemctl daemon-reload
To unregister the script (i.e., stop it from running at startup/shutdown):
- sudo update-rc.d -f pibot_auto remove
- Configuring WIFI on Pi Zero:
Set up wifi on the Pi Zero
Follow the instructions on the following web page to set up wifi on the Pi Zero:
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.
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.