wiki:PiBotDev

Version 3 (modified by aborgwardt, 9 years ago) (diff)

Some more formatting...

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)
    • http://pi4j.com/install.html[[BR]]
    • 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???)

NOTE: For more about this plugin, visit the URL:

http://tsvetan-stoyanov.github.io/launchpi/

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

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:

https://thepihut.com/blogs/raspberry-pi-tutorials/83502916-how-to-setup-wifi-on-raspbian-jessie-lite

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.