Skip to content

hacktheturtle/techno

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hack the Turtle - Techno

What happens when you put an ARM M3 with sensors, servors and LEDs in a kids twilight turtle? Let’s find out!

Getting started using MapleIDE

You can download Maple IDE for your operating system, the install it.

Opening the code

First use the Arduino based IDE to build code and update the turtle.

Load the code techno.pde in the IDE

Configure Board

Under Tools -> Board choose LeafLabs Maple Rev3+ to Flash

Compile Code

Click the play button or hit ctrl-r to build the code. This doesn’t upload to the turtle..

Flash the turtle

Click the upload button or hit ctrl-u to flash the turtle. It will rebuild the code if needed, so you don’t actually need to compile unless you are looking for compile errors.

In the console you will eventually see something like:

Binary sketch size is reported above. Check it against a 108000 byte maximum.
Loading via dfu-util
Resetting to bootloader via DTR pulse

Reset via USB Serial Failed! Did you select the serial right serial port?
Assuming the board is in perpetual bootloader mode and continuing to attempt dfu programming...


Searching for DFU device [1EAF:0003]...

At this point you need to find the reset button on the board and press it. At which point the ide tells you:

Found it!

A few seconds later the turtle will be running your code!

Using MapleIDE only for build & flash

For now we won’t use a unix toolchain, because it didn’t work for me. But we can vastly improve our flow by only using the IDE to build/upload.

Using your editor

In MapleIDE prefrences, choose Use external editor.

Our new workflow is:

  1. edit code in emacs, save
  2. alt-tab to MapleIDE and press ctrl-u to compile and upload
  3. wait for the upload to start and reset the turtle (entering bootload mode)

Serial

Luckily the board supports serial usb for logging!

It is ”slow” but for debugging it is very useful.

To access it from my computer I use screen

screen /dev/cu.usbmodem1421

Then anytime my code runs SerialUSB.println("string here"); You will see a line of text in your screen session.

turtle hardware

neopixels

pixel values are GRB

Open Questions

Using unix toolchain

Homebrew has dfu-util. make install from the tutorial failed to flash though.

perpetual bootload mode

It sucks to have press reset on the turtle to flash it. If only my computer could trigger reset/flash?

Right now I’ve made it so pressing shell and green buttons will cause a reset. Which is better than flipping the turtle over and finding the tiny reset button on the board.

accelerometer

how do I use

serial io

screen is great except it goes away when turtle is re-flashed..

also does the port change? /dev/cu.usbmodem1421

multiple source files

having everything in a single file is becoming annoying

I’ve started splitting into .h and .pde files for use with the IDE, using notes from forums.

wireless?

xbee? bluetooth?

can I flash it and get Serial USB without wires?

Releases

No releases published

Packages

No packages published