RedArduino:
Filter:
redSys/Classes (extension) | Red > redTools

RedArduino
ExtensionExtension

for uploading sketches to arduino

Description

This class can be used for uploading sketches to an Arduino from SuperCollider via the soundcard. No FTDI chip needed! It's a very cheap way to program barebone arduino boards.

  1. Download the bootloader AudioBoot_V2_0 from http://www.hobby-roboter.de/forum/viewtopic.php?f=4&t=127
  2. Burn it to a ATmega168 chip using STK500, USBtinyISP or similar avr programmer.
  3. avrdude -v -p m168 -b 115200 -P /dev/tty.PL2303-000013FA -c stk500v2 -U flash:w:/Users/asdf/AudioBoot_V2_0/Atmega_Source/chAudioBoot_ATMEGA168_IN_PD1_LED_PB5.hex -U lfuse:w:0xE2:m -U hfuse:w:0xDF:m -U efuse:w:0xFA:m
  4. Build the barebone arduino circuit from http://www.hobby-roboter.de/forum/viewtopic.php?f=4&t=128&p=531

Class Methods

.read

Create a new instance and read a hex file.

Instance Methods

.read

Read a hex file.

.upload

Starts the server and the upload process.

NOTE: Do not change the last three arguments if you want the upload to work with the AudioBoot_V2_0 bootloader. if you are only interested in the sound of serial data, you can of course try to change these arguments.

Arguments:

server

If nil then the Server.default will be used.

out

Which audio bus to play to. Note: can also be an Array.

amp

Amplitude.

silenceBetweenPages

Gap in seconds.

startSequencePulses

Pulses in the beginning.

manchesterNumberOfSamplesPerBit

Samples per bit.

.intel

After a successful read, this holds an instance of RedIntelHex.

Examples