Skip to content

lukehutch/usb-copier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

usb-copier

USB drive copier example project for the Adafruit 128x64 OLED Raspberry Pi bonnet, using a USB hub such as the Zero4U shield.

Uses the Adafruit OLED Bonnet Toolkit to implement an asynchronous UI for USB drive copying/formatting, controlled by the D-pad and A/B buttons.

USB copier screenshot, English
The USB copier application, showing highlighted menus (arranged using the layout system).

Setup instructions

On the build machine:

  • git clone https://github.com/lukehutch/Adafruit-OLED-Bonnet-Toolkit.git
  • cd Adafruit-OLED-Bonnet-Toolkit ; mvn install ; cd ..
  • git clone https://github.com/lukehutch/usb-copier.git
  • cd usb-copier ; mvn package ; cd ..
  • Then copy usb-copier/target/usb-copier-0.0.2-jar-with-dependencies.jar to /home/pi on the Raspberry Pi.

On the Raspberry Pi:

  • Run raspi-config and enable Interfacing Options -> Advanced Options -> i2c
  • apt-get install openjdk-11-jdk wiringpi pigpio nano udevil
  • sudo nano /etc/cmdline.txt
    • add kernel option: (otherwise GPIO handler cannot access /dev/mem)
      • iomem=relaxed
  • sudo nano /etc/config.txt
    • add options:
      • dtparam=i2c_arm=on
      • dtparam=i2c_baudrate=1000000
  • Extract libpi4j-pigpio.so to /home/pi (this is needed due to a bug in the library loading code)
    • cd ; unzip -j /path/to/usb-copier-0.0.2-jar-with-dependencies.jar lib/armhf/libpi4j-pigpio.so
  • Add to /etc/rc.local :
    • sudo bash -c 'nohup java -Dpi4j.library.path=/home/pi -jar /home/pi/usb-copier-0.0.2-jar-with-dependencies.jar &'

(Some steps may need to be tweaked a little...)

About

USB drive copier example project for Raspberry Pi with the Adafruit 128x64 bonnet

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages