10
Bean Oliver González Maker con un titulo de ingeniería www.TenerifeMakerSpace.com

DemoDay: Lightblue Bean

Embed Size (px)

Citation preview

Bean

Oliver GonzálezMaker con un titulo de ingeniería

www.TenerifeMakerSpace.com

¿Qué es?

1. Tarjeta de control miniatura2. Compatible con lenguaje arduino3. Se alimenta de pila botón de 3V4. Conexión mediante bluetooth

https://punchthrough.com

Bean

• ATmega 328p (8MHz)• 3V operating voltage (CR2032 coin

cell battery)• 6 digital I/O pins, 2 analog pins• Bluetooth LE Peripheral• 3-axis accelerometer• Temperature sensor• RGB LED• Support on OS X and iOS

¿Cómo se programa?

http://vimeo.com/113816503

OpenSource

• Eagle schematic• Eagle PCB layout• Gerber files• SVG for schematics• 3D Models

https://punchthrough.com/bean/hardware-files/

Vamos a currar

https://punchthrough.com/bean/hardware-files/

El código

http://punchthrough.com/bean/examples/theremin/

#define BLEVEL 255#define MINLEVEL 50

void setup(){ // initialize serial communication Serial.begin(57600); pinMode(0, OUTPUT); //set D0 as output pinMode(2, OUTPUT); digitalWrite(0, LOW); //turn it off initially}

// the loop routine runs over and over again forever:void loop(){ digitalWrite(0, HIGH); delay(10); int sensorValue = analogRead(A1); int r,g,b; if (sensorValue > MINLEVEL && sensorValue < BLEVEL + 1) { g = (sensorValue - MINLEVEL) / 2; b = 0; } else if (sensorValue > BLEVEL) { g = sensorValue - MINLEVEL; if (g > 255) { g = 255; } b = sensorValue - BLEVEL; if (b > 255) { b = 255; } } else { g = 0; b = 0; } Bean.setLed(0, g, b); tone(2, 300 + sensorValue * 10, 20);}

¿y ahora?

Síguenos

facebook.com/TenerifeMakerSpace @MakersTenerife