how to upload contiki to arduino

Hi! You need to obtain a copy of the Contiki Arduino port and execute the commands below.

Cheers,
Nestor

Clone contiki-arduino source code tree

git clone https://github.com/contiki/contiki-arduino

COMPILING AND UPLOADING TO ARDUINO

To compile the code, e.g., under examples/hello-world

make TARGET=arduino ARDUINO_MODEL=Duemilanove

To generate hex image file

avr-objcopy hello-world.arduino -j .text -j .data -O ihex hello-world.hex

To program the Arduino

avrdude -D -p atmega328p -c arduino -P /dev/ttyUSB0 -b 57600 -Uflash:w:hello-world.hex

To monitor the serial output

ttylog -V -d /dev/ttyUSB0 -b 115200

foxboy6:
with out the contiki.h, normal...

hello-world.c:42:21: error: contiki.h: No such file or directory
hello-world.c:46: error: expected ')' before string constant
hello-world.c:47: error: expected declaration specifiers or '...' before '&' token

then i put the contiki.h in the project folder, and it appears lots of other missing files, that contiki needs...

i need to know is: with contiki in linux:

  • how to start a new project?
  • how to compile to arduino
  • how to send to arduino by usb cable, or what software i will use?