Upload Arduino sketch from Raspberrypi to RPICT: Difference between revisions

From lechacal
Jump to navigation Jump to search
Line 21: Line 21:
Get the package from our server.
Get the package from our server.


  wget lechacal.com/lcl-upload-sketch.zip
  wget lechacal.com/RPICT/tools/lcl-upload-sketch.zip


deflate the file.
deflate the file.

Revision as of 17:18, 21 April 2021

This article will guide you to upload an Arduino sketch form teh raspberrypi directly to the RPICT units.

Prerequisite

This only works with RPICT units having an atmega328p chip and with autoreset support.

Suitable units are any RPICT version 5.

This won't work with any RPICT unit version 3 and RPICT3V1/RPICT3T1.

The atmega328p chip must have bootloader enabled. If not then the bootloader should be burnt with the NanoProg first.


Installation

First of all install avrdude.

sudo apt-get install avrdude

Get the package from our server.

wget lechacal.com/RPICT/tools/lcl-upload-sketch.zip

deflate the file.

unzip lcl-upload-sketch.zip

get inside.

cd lcl-upload-sketch

run the installation script.

./install.sh

Operation

Open your sketch with the Arduino IDE. (This might be on a separate computer, not necessarily on the Raspberrypi).

Run Sketch | Verify/Compile.

This creates a file in the temporary directory.
On a linux system this is inside /tmp/arduino_build_xxxxxx.
On windows this could be somewhere like C:\Users\user\AppData\Local\Temp\build4436557367508469592.tmp

If your sketch is named sketch then take the sketch.ino.hex file and copy it over to the raspberrypi.

Upload the file to the RPICT units using the command below:

lcl-upload-sketch.sh sketch.ino.hex

Credits

Credits go to the SpellFoundry on Github who has well inspired this.