aka: androdino
Make a remote control Lego car. Add motors, gears, etc, to a this Lego set and connect it to an Arudino card outfitted with bluetooth and control it with an app on an Android Phone.
Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.
ATmega328, 16Mhz
ATmega2560, 16Mhz (more pins, basically)
ARM Cortex M3, 32-bit
Basically, it's an Arduino MEGA ADK (ATmega2560, 16Mhz)
Basically, it's an Arduino Due (ARM Cortex M3, 32-bit)
With a TON of sensors and LEDs
Plus dozens of others (ruggedunio and iteaduino)!
Here are a few I have here
Wanna see them? (maybe after the demo, which is next)
#include string.h
#define right1 5 //define I1 interface
#define speedPinRight 6 //enable right motor (bridge A)
#define right2 7 //define I2 interface
#define left1 8 //define I3 interface
#define speedPinLeft 9 //enable motor B
#define left2 10 //define I4 interface
//Motor Pins
int dir1B = right1;
int speedB = speedPinRight;
int dir2B = right2;
int dir1A = left1;
int speedA = speedPinLeft;
int dir2A = left2;
//Bluetooth Pins
const int rxPin = 0; // pin used to receive, though, on the itead card, PIN 0 is TX
const int txPin = 1; // pin used to send to, though, on the itead card, PIN 1 is RX
//Other Bluetooth related globals
int availBytes;
const int stringSize = 64;
char stringarr[stringSize];
//Used for the ledPin test
const int ledPin = 2;
char sval;
char bval;
//Other Globals . . . love GLOBALS
int loopDelay = 50;
const float speedFactor = 28.3;
String CTRLStr = '\0';
int frBool = 0;
int speedVal = 0;
int lrBool = 0;
int dirVal = 0;
int headBool = 0;
int brakeLeftBool = 0;
int brakeRightBool = 0;
//This is a valid string
//API: s:foward/reverse:speed:left/right:direction:headlights:brakeleft:brakeright
//ex s:1:5:1:5:0:0:0
int apiStringSize = 15;
char apiStartChar = 's';
//needed for splitString
const int MAX_ARGS = 9;
char byteRead;
void setup()
{
//Serial is used for bluetooth
Serial.begin(9600);
//Testing Pin
pinMode(ledPin, OUTPUT);
//Motor Pins
pinMode (dir1A, OUTPUT);
pinMode (dir2A, OUTPUT);
pinMode (dir1B, OUTPUT);
pinMode (dir2B, OUTPUT);
pinMode (speedA, OUTPUT);
pinMode (speedB, OUTPUT);
}
void loop()
{
//Blank out the string array that will hold the data from Bluetooth
for(int i=0; i= apiStringSize) {
//Every Serial.print/println/write is just a debug message sent to Bluetooth device
Serial.print("Bluetooth Serial Available: ");
Serial.println(availBytes);
//Read in everything . . . we only need the first apiStringSize but we want to
//clear the buffer of everything else, one char at a time
for(int i=0; i=parserCnt){
rFromIndex = rToIndex+1;
rToIndex = s.indexOf(parser,rFromIndex);
if(index == parserCnt){
if(rToIndex == 0 || rToIndex == -1){
return '\0';
}
return s.substring(rFromIndex,rToIndex);
}
else{
parserCnt++;
}
}
return rs;
}
Had to show something at a CODE camp.
Use that extra usb port!
Put a phone in as the windshield
Books!!
Honorable mention to electronics and lego stackexchanges
Want to laugh? Check out my panic post from this morning.