EB1

From My WIki
Jump to: navigation, search

EB1 电脑一号:A self-contained learning platform.

The Electric Brain 1 (EB1) 电脑一号 is a simple yet surprisingly capable microprocessor and electronics learning tool.

IMG 9619ms.jpg


Example Videos



Contents

Technical Specifications

TechnicalSpecifications2015-07-04.png
//digital 0 is a PWM pin
//digital 1 is a PWM pin
//digital 2 is analog 1
//digital 3 is analog 3
//digital 4 is analog 2

Getting Started With Your EB1

Install the Arduino IDE

EB1Installation

Install the EB1 Core

Add Core

Install USB Drivers

Install USB Drivers

old system
EB1 Software Installation

Ways To Power Your EB1

USB on your computer
USB portable power supply
AC to USB And USB Extension Cable
12v to USB

Coin cell battery CR2032

How to Install and Remove the Battery

Place the battery with the plus sign on the top side. I added an arrow to highlight the hard to read plus sign on the battery.
Then press the battery flat into the battery holder.
0001bat.png

To remove the battery use a small flathead screwdriver to pry the battery out, as shown in the picture.
IMG 0949m.jpg

Tutorials

Use at your own risk, and we are not providing ANY user support at this time!



Upload Your Code

  1. Make sure the EB1 is turned off. Do not put it in your USB yet
  2. Check to see if you have the correct board selected.
  3. Compile your program by clicking the circle with the check mark
  4. place the EB1 in your USB port, notes that the LEDs are oscillating in intensity




Make The LEDs Blink

Basic Blink Program

//**************************************************************************
 
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 1 as an output.
  pinMode(1, OUTPUT);
}
 
// the loop function runs over and over again forever
void loop() {
  digitalWrite(1, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);              // wait for 500 / 1000 of a second
  digitalWrite(1, LOW);    // turn the LED off by making the voltage LOW
  delay(500);              // wait for 500 / 1000 of a second
}
//**************************************************************************



Strobe Blinker

EB-1-Strobe.gif
This is the program for a safety light on a survival raft.

//**************************************************************************
 
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 1 as an output.
  pinMode(1, OUTPUT);
}
 
// the loop function runs over and over again forever
void loop() {
  digitalWrite(1, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(10);              // wait for 10 thousands of a second
  digitalWrite(1, LOW);    // turn the LED off by making the voltage LOW
  delay(700);              // wait for 700 thousands of a second
}
//**************************************************************************

Blink Like a Heart Monitor

EB-1-Hart.gif
This is a program to make the LEDs beat like that of a heart monitor.

//**************************************************************************
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 1 as an output.
  pinMode(1, OUTPUT);
}
 
// the loop function runs over and over again forever
void loop() {
  digitalWrite(1, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(100);              // wait for a tenth of second
  digitalWrite(1, LOW);    // turn the LED off by making the voltage LOW
  delay(100);              // wait for a tenth of second
  digitalWrite(1, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(100);              // wait for a tenth of second
  digitalWrite(1, LOW);    // turn the LED off by making the voltage LOW
  delay(700);              // wait for seven tenths of second
}
//**************************************************************************

SOS In Morse Code

Seaman send Morse code signals.jpg
https://en.wikipedia.org/wiki/File:Seaman_send_Morse_code_signals.jpg
Morse code is one of the earliest systems of communication used to communicate through a wire. It has long been used for radio communication by the United States Air Force and Navy and even for some satellite communication. The Navy during periods of radio silence will use a signal lamp like the one in the picture to communicate by Morse code through light.

Below is a chart showing the Morse code system. At first it may look simple, but if you look closely there are a lot of little crazy rules such as one – is equal to three dots and the space between two letters is equal to three dots. To become proficient in Morse code takes a lot of dedication and training however with the help of a microcontroller you can generate Morse code signals rather easily.
International Morse Code.PNG
Picture from https://en.wikipedia.org/wiki/Morse_code#/media/File:International_Morse_Code.svg
https://en.wikipedia.org/wiki/Morse_code
https://en.wikipedia.org/wiki/SOS

//**************************************************************************
int const LED_Pin = 1;
 
int const dot = 200; 
int const dash = 3 * dot;
int const space_between_parts_of_the_same_letter = dot;
int const space_between_two_letters = 3 * dot;
int const space_between_two_words = 7 * dot;
 
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 1 as an output.
  pinMode(LED_Pin, OUTPUT);
}
 
// the loop function runs over and over again forever
void loop() {
  S();
  delay(space_between_two_letters);
  O();
  delay(space_between_two_letters);
  S();
  delay(space_between_two_words);
 
}
 
void S(void) {
  puls(3,dot);
}
 
void O(void) {
  puls(3,dash);
}
 
void puls( int numberOfPulses, int pulsLangth )
{
  for (int i=0; i < numberOfPulses; i++){
    if(!0)delay(space_between_parts_of_the_same_letter); // do not use the first time
    digitalWrite(LED_Pin, HIGH);
    delay(pulsLangth);
    digitalWrite(LED_Pin, LOW);
  }
 
}
//**************************************************************************

Full Morse Code

This code is based on the code from this site. https://gist.github.com/madc/4474559

 
//**************************************************************************
int const LED_Pin = 1;
 
int const dot = 200; 
int const dash = 3 * dot;
int const space_between_parts_of_the_same_letter = dot;
int const space_between_two_letters = 3 * dot;
int const space_between_two_words = 7 * dot; // 2 * space_between_parts_of_the_same_letter + 5 * dot = 7 * dot
 
//Build a struct with the morse code mapping
static const struct {const char letter, *code;} MorseMap[] =
{
  { 'A', ".-" },     { 'B', "-..." },   { 'C', "-.-." },  { 'D', "-.." },    { 'E', "." },      { 'F', "..-." },   { 'G', "--." }, 
  { 'H', "...." },   { 'I', ".." },     { 'J', ".---" },  { 'K', ".-.-" },   { 'L', ".-.." },   { 'M', "--" },     { 'N', "-." },   
  { 'O', "---" },    { 'P', ".--." },   { 'Q', "--.-" },  { 'R', ".-." },    { 'S', "..." },    { 'T', "-" },      { 'U', "..-" },
  { 'V', "...-" },   { 'W', ".--" },    { 'X', "-..-" },  { 'Y', "-.--" },   { 'Z', "--.." },   { ' ', "     " }, //Gap between word, seven units 
  { '1', ".----" },  { '2', "..---" },  { '3', "...--" }, { '4', "....-" },  { '5', "....." },  { '6', "-...." },  { '7', "--..." },  
  { '8', "---.." },  { '9', "----." },  { '0', "-----" }, { '.', "·–·–·–" }, { ',', "--..--" }, { '?', "..--.." }, { '!', "-.-.--" }, 
  { ':', "---..." }, { ';', "-.-.-." }, { '(', "-.--." }, { ')', "-.--.-" }, { '"', ".-..-." }, { '@', ".--.-." }, { '&', ".-..." }, 
};
 
void setup()
{
  pinMode( LED_Pin, OUTPUT );
  digitalWrite( LED_Pin, LOW );
}
 
void loop()
{
  String morseWord = encode( "SOS " );
 
  for(int i=0; i<=morseWord.length(); i++)
  {
    switch( morseWord[i] )
    {
      case '.': //dit
        digitalWrite( LED_Pin, HIGH );
        delay( dot );
        digitalWrite( LED_Pin, LOW );
        delay( space_between_parts_of_the_same_letter );
        break;
      case '-': //dah
        digitalWrite( LED_Pin, HIGH );
        delay( dash );
        digitalWrite( LED_Pin, LOW );
        delay( space_between_parts_of_the_same_letter );
        break;
      case ' ': //gap
        delay( space_between_parts_of_the_same_letter );
    }
  }
}
 
String encode(const char *string)
{
  size_t i, j;
  String morseWord = "";
 
  for( i = 0; string[i]; ++i )
  {
    for( j = 0; j < sizeof MorseMap / sizeof *MorseMap; ++j )
    {
      if( toupper(string[i]) == MorseMap[j].letter )
      {
        morseWord += MorseMap[j].code;
        break;
      }
    }
    morseWord += " "; //Add tailing space to seperate the chars
  }
  return morseWord;  
}
 
String decode(String morse)
{
  String msg = "";
 
  int lastPos = 0;
  int pos = morse.indexOf(' ');
  while( lastPos <= morse.lastIndexOf(' ') )
  {    
    for( int i = 0; i < sizeof MorseMap / sizeof *MorseMap; ++i )
    {
      if( morse.substring(lastPos, pos) == MorseMap[i].code )
      {
        msg += MorseMap[i].letter;
      }
    }
    lastPos = pos+1;
    pos = morse.indexOf(' ', lastPos);
 
    // Handle white-spaces between words (7 spaces)
    while( morse[lastPos] == ' ' && morse[pos+1] == ' ' )
    {
      pos ++;
    }
  }
  return msg;
}
//**************************************************************************

Copyright (c) 2015 Matthias Esterl

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Make Your Own LED Blink

OK you have done enough coding, it's time to add an LED.
LED-001.jpg
LEDs are strange in a number of ways.
This is because they are diodes.
L = Light
E = Emitting
D = Diode
Diodes only allow electricity to flow in one direction.
This means that LEDs only work in one direction.
LED are also very fussy about what voltage they are hooked up to.
The most common way to solve this problem, is to use them with a resistor attached to one of their legs.
The reasons why are a bit complicated, so we are not going to explain them here.
Using a resistor with your LED is so important, we added 2 spots on the socket with resistors.
Note-001.png
You can see the 2 spots on the left.
The top one is positive (+) with a 450 ohm resistor attached to it.
The bottom one is the same with a 1.5k ohm resistor.
On the right are 2 grounds or negatives (-).


Oh yes, the direction of the LED is important.
The side with the longer leg is the part that goes to the positive side with the resistors.
LED-w-LongLeg.png
just in case you don't know which one is longer, I added an arrow.

LED-2.jpg
To make the LEDs fit better on the EB1, I like to bend the longer leg.


PowerLED.png
If you place the LED as shown in this picture, the LED will work as a power indicator, just like the other power indicator LED.


IMG 9656s.jpg
If you place your LED as it is in this picture, the LED will flash at the same time as the 2 yellow LEDs already on the PCB.
This is because they both use the same pin on the micro-controller.
Pin1.png
Now you can retry all the silly programs that you tried already.

2LEDs.png

EB-1-as123.gif
Turn your EB1 into a mini Christmas tree.

//**************************************************************************
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 1 as an output.
  pinMode(1, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
}
 
// the loop function runs over and over again forever
void loop() {
  digitalWrite(1, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);              // wait for 500 / 1000 of a second
  digitalWrite(1, LOW);    // turn the LED off by making the voltage LOW
  digitalWrite(3, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);              // wait for 500 / 1000 of a second
  digitalWrite(3, LOW);    // turn the LED off by making the voltage LOW
  digitalWrite(4, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);              // wait for 500 / 1000 of a second
  digitalWrite(4, LOW);    // turn the LED off by making the voltage LOW
}
//**************************************************************************

PWM is for Pulse-Width Modulation

640px-Delta PWM.svg.png
this picture is from: https://en.wikipedia.org/wiki/Pulse-width_modulation
2015-07-27
Pulse width modulation is a way to control the amount of power supply to a device by giving it bursts of energy. Wider pulse width releases more energy. Narrower pulse width gives less energy.

This program uses PWM to fade on and off much the same way a firefly insect does.

Fireflies flash with various intensity and frequency as a form of communication to other fireflies to help them find a mate. I have not yet cracked the code of any particular species of firefly. But once I do, I will be able to communicate with insects.
Www.firefly.org.png
this picture is from: http://www.firefly.org/n
2015-07-27

//**************************************************************************
int ledPin = 1; // Pin 0, Pin 1 Bowth work with PWM
 
void setup() {
  pinMode(ledPin, OUTPUT);
}
void loop() {
     for (int i=0; i <= 255; i++){
      analogWrite(ledPin, i);
      delay(5);
   } 
     for (int i=255; i >= 0; i--){
      analogWrite(ledPin, i);
      delay(5);
   } 
//analogWrite(ledPin, 0);
delay(300);
}
//**************************************************************************


Pulse Width Modulation by Bit Banging

//**************************************************************************
int LED = 1;
const long BigVal = 10200;
 
void setup() {
    pinMode(LED, OUTPUT);
}
void loop() {
  for (long fadeValue = 1 ; fadeValue <= BigVal ; fadeValue++) { 
      digitalWrite(LED, HIGH ); 
      delayMicroseconds(fadeValue);             
      digitalWrite(LED, LOW );    
      delayMicroseconds(BigVal - fadeValue -1 );  
      fadeValue *= 1.07;
  }  
  digitalWrite(LED, HIGH );
  delay(700);  // ON delay
  for (long fadeValue = BigVal ; fadeValue > 0 ; fadeValue--) { 
      digitalWrite(LED, HIGH );   
      delayMicroseconds(fadeValue);             
      digitalWrite(LED, LOW );   
      delayMicroseconds(BigVal - fadeValue +1 );  
      fadeValue /= 1.07;
  }  
  digitalWrite(LED, LOW );
  delay(3000);  // OFF delay
}
//**************************************************************************

Twist a Resistor (Potentiometer)

Now it's time to put a Potentiometer in place.
IMG 9658ms.jpg

I need to Mention

      • Mention

analogRead
map

Note that the analog input has a different number than if it is a digital input or output.
Analog-Input.png

Adjustable LED Blinky Frequency

//**************************************************************************
int ledPin = 1;   
 
void setup() {
  pinMode(ledPin, OUTPUT);
}
 
void loop() {
 
  int sensorValue = analogRead(1);
  int BlinkValue = map(sensorValue, 0, 1023, 1, 1000);
  digitalWrite(ledPin,HIGH);
  delay(BlinkValue);
  digitalWrite(ledPin,LOW);
  delay(BlinkValue);
 
}
//**************************************************************************

Adjustable LED Strobe Light For a Fan

Fan-Sequence 01 6.gif
StobeNfan.png
Strobe-Setup-02.png

//**************************************************************************
int ledPin = 1;   
 
void setup() {
  pinMode(ledPin, OUTPUT);
}
 
void loop() {
  int sensorValue = analogRead(1);
  long BlinkValue = map(sensorValue, 0, 1023, 100, 10000);
  digitalWrite(ledPin,HIGH);
  delayMicroseconds(BlinkValue);
  digitalWrite(ledPin,LOW);
  delayMicroseconds(10 * BlinkValue);
}
//**************************************************************************

Adjustable LED Strobe Light For Water Droplets

EB1-Strobe.pngDrop.gif

//**************************************************************************
int ledPin = 1;   
 
void setup() {
  pinMode(ledPin, OUTPUT);
}
 
void loop() {
  int sensorValue = analogRead(1);
  long BlinkValue = map(sensorValue, 0, 1023, 10, 1000);
  for (int i=0; i <= 10; i++){
  digitalWrite(ledPin,HIGH);
  delayMicroseconds(BlinkValue);
  digitalWrite(ledPin,LOW);
  delayMicroseconds(10 * BlinkValue);
  }
}
//**************************************************************************

Adjustable LED Intensity

Mention
analogWrite PWM

//**************************************************************************
int ledPin = 1;
 
void setup() {
  pinMode(ledPin, OUTPUT);
}
void loop() {
 
  int sensorValue = analogRead(1);
  int fadeValue = map(sensorValue, 0, 1023, 0, 255);
  //BlinkValue = 1000;
  analogWrite(ledPin, fadeValue);
}
//**************************************************************************

Make a Beeper for Cheaper

Add a Piezo Beeper - PS1240
it looks like this
PIEZO-BEEPER-PS1240.png
This is not to scale. "In real life it's much smaller"
PIEZO-BEEPER-PS1240-Bottom.png
This is what the Beeper looks like from the bottom.

20150922130041.png
It's likely your beeper will still have some of the paper tape still on it. Don't worry about it, just remove it with your finger nails.

Place it in the EB-1 as shown in this picture.
Make sure there is one spot open between the legs of the beeper.

Unnamed QQ Screenshot20150704184632.png

1kz Tone

First use the Blink program to generate a 1kz tone.

//**************************************************************************
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 13 as an output.
  pinMode(0, OUTPUT);
}
 
// the loop function runs over and over again forever
void loop() {
  digitalWrite(0, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1);              // wait for a second
  digitalWrite(0, LOW);    // turn the LED off by making the voltage LOW
  delay(1);              // wait for a second
}
//**************************************************************************


SineWave.png


Thank you Wikipedia for the image
https://en.wikipedia.org/wiki/File:Waveforms.svg
And much more information about Sine waves at
https://en.wikipedia.org/wiki/Sine_wave

Play a Little Tune

//**************************************************************************
// Buzzer example function for the CEM-1203 buzzer (Sparkfun's part #COM-07950).
// by Rob Faludi
// http://www.faludi.com
 
 const int targetPin = 0;
 
void setup() {
  pinMode(targetPin, OUTPUT); // set a pin for buzzer output
}
void loop() {
 
buzz(660,100);
delay(75);buzz(660,100);delay(150);buzz(660,100);delay(150);buzz(510,100);delay(50);buzz(660,100);delay(150);buzz(770,100);delay(275);buzz(380,100);
delay(287);buzz(510,100);delay(225);buzz(380,100);delay(200);buzz(320,100);delay(250);buzz(440,100);delay(150);buzz(480,80);delay(165);buzz(450,100);
delay(75);buzz(430,100);delay(150);buzz(380,100);delay(100);buzz(660,80);delay(100);buzz(760,50);delay(75);buzz(860,100);delay(150);buzz(700,80);
delay(75);buzz(760,50);delay(175);buzz(660,80);delay(150);buzz(520,80);delay(75);buzz(580,80);delay(75);buzz(480,80);delay(175);buzz(510,100);
delay(275);buzz(380,100);delay(200);buzz(320,100);delay(250);buzz(440,100);delay(150);buzz(480,80);delay(165);buzz(450,100);delay(75);buzz(430,100);
delay(150);buzz(380,100);delay(100);buzz(660,80);delay(100);buzz(760,50);delay(75);buzz(860,100);delay(150);buzz(700,80);delay(75);buzz(760,50);
delay(175);buzz(660,80);delay(150);buzz(520,80);delay(75);buzz(580,80);delay(75);buzz(480,80);delay(250);buzz(500,100);delay(150);buzz(760,100);
delay(50);buzz(720,100);delay(75);buzz(680,100);delay(75);buzz(620,150);delay(150);buzz(650,150);delay(150);buzz(380,100);delay(75);buzz(430,100);
delay(75);buzz(500,100);delay(150);buzz(430,100);delay(75);buzz(500,100);delay(50);buzz(570,100);delay(110);buzz(500,100);delay(150);buzz(760,100);
delay(50);buzz(720,100);delay(75);buzz(680,100);delay(75);buzz(620,150);delay(150);buzz(650,200);delay(150);buzz(1020,80);delay(150);buzz(1020,80);
delay(75);buzz(1020,80);delay(150);buzz(380,100);delay(150);buzz(500,100);delay(150);buzz(760,100);delay(50);buzz(720,100);delay(75);buzz(680,100);
delay(75);buzz(620,150);delay(150);buzz(650,150);delay(150);buzz(380,100);delay(75);buzz(430,100);delay(75);buzz(500,100);delay(150);buzz(430,100);
delay(75);buzz(500,100);delay(50);buzz(570,100);delay(110);buzz(500,100);delay(150);buzz(760,100);delay(50);buzz(720,100);delay(75);buzz(680,100);
delay(75);buzz(620,150);delay(150);buzz(650,200);delay(150);buzz(1020,80);delay(150);buzz(1020,80);delay(75);buzz(1020,80);delay(150);buzz(380,100);
delay(150);buzz(500,100);delay(150);buzz(760,100);delay(50);buzz(720,100);delay(75);buzz(680,100);delay(75);buzz(620,150);delay(150);buzz(650,150);
delay(150);buzz(380,100);delay(75);buzz(430,100);delay(75);buzz(500,100);delay(150);buzz(430,100);delay(75);buzz(500,100);delay(50);buzz(570,100);
delay(210);buzz(585,100);delay(275);buzz(550,100);delay(210);buzz(500,100);delay(180);buzz(380,100);delay(150);buzz(500,100);delay(150);buzz(500,100);
delay(75);buzz(500,100);delay(150);buzz(500,60);delay(75);buzz(500,80);delay(150);buzz(500,60);delay(175);buzz(500,80);delay(75);buzz(580,80);
delay(175);buzz(660,80);delay(75);buzz(500,80);delay(150);buzz(430,80);delay(75);buzz(380,80);delay(300);buzz(500,60);delay(75);buzz(500,80);
delay(150);buzz(500,60);delay(175);buzz(500,80);delay(75);buzz(580,80);delay(75);buzz(660,80);delay(225);buzz(870,80);delay(162);buzz(760,80);
delay(300);buzz(500,60);delay(75);buzz(500,80);delay(150);buzz(500,60);delay(175);buzz(500,80);delay(75);buzz(580,80);delay(175);buzz(660,80);
delay(75);buzz(500,80);delay(150);buzz(430,80);delay(75);buzz(380,80);delay(300);buzz(660,100);delay(75);buzz(660,100);delay(150);buzz(660,100);
delay(150);buzz(510,100);delay(50);buzz(660,100);delay(150);buzz(770,100);delay(225);buzz(380,100);
}
//void buzz(int targetPin, int targetPin, long frequency, long length) {
void buzz( long frequency, long length) {
  long delayValue = 1000000/frequency/2; // calculate the delay value between transitions
  //// 1 second's worth of microseconds, divided by the frequency, then split in half since
  //// there are two phases to each cycle
  long numCycles = frequency * length/ 1000; // calculate the number of cycles for proper timing
  //// multiply frequency, which is really cycles per second, by the number of seconds to 
  //// get the total number of cycles to produce
 for (long i=0; i < numCycles; i++){ // for the calculated length of time...
    digitalWrite(targetPin,HIGH); // write the buzzer pin high to push out the diaphram
    delayMicroseconds(delayValue); // wait for the calculated delay value
    digitalWrite(targetPin,LOW); // write the buzzer pin low to pull back the diaphram
    delayMicroseconds(delayValue); // wait againf or the calculated delay value
  }
}
//**************************************************************************

Adjustable Tone Generator

IMG 9615ms.jpg

//**************************************************************************
 
int const targetPin = 0;
 
void setup() {
  pinMode(targetPin, OUTPUT); // set a pin for buzzer output
}
 
void loop() {
int frequency = analogRead(1); 
buzz(frequency,10);
}
 
void buzz( long frequency, long length) {
  long delayValue = 1000000/frequency/2; // calculate the delay value between transitions
  //// 1 second's worth of microseconds, divided by the frequency, then split in half since
  //// there are two phases to each cycle
  long numCycles = frequency * length/ 1000; // calculate the number of cycles for proper timing
  //// multiply frequency, which is really cycles per second, by the number of seconds to 
  //// get the total number of cycles to produce
 for (long i=0; i < numCycles; i++){ // for the calculated length of time...
    digitalWrite(targetPin,HIGH); // write the buzzer pin high to push out the diaphram
    delayMicroseconds(delayValue); // wait for the calculated delay value
    digitalWrite(targetPin,LOW); // write the buzzer pin low to pull back the diaphram
    delayMicroseconds(delayValue); // wait againf or the calculated delay value
  }
}
//**************************************************************************

Mr.Photoresistor

More then you ever wanted to know is here: https://en.wikipedia.org/wiki/Photoresistor

Photo-Resister.png

//**************************************************************************
 
int const targetPin = 0;
 
void setup() {
  pinMode(targetPin, OUTPUT); // set a pin for buzzer output
}
void loop() {
int frequency = analogRead(1);
frequency = map(frequency, 0, 1023, 180, 1720);
buzz(frequency,10);
}
void buzz( long frequency, long length) {
  long delayValue = 1000000/frequency/2; // calculate the delay value between transitions
  //// 1 second's worth of microseconds, divided by the frequency, then split in half since
  //// there are two phases to each cycle
  long numCycles = frequency * length/ 1000; // calculate the number of cycles for proper timing
  //// multiply frequency, which is really cycles per second, by the number of seconds to 
  //// get the total number of cycles to produce
 for (long i=0; i < numCycles; i++){ // for the calculated length of time...
    digitalWrite(targetPin,HIGH); // write the buzzer pin high to push out the diaphram
    delayMicroseconds(delayValue); // wait for the calculated delay value
    digitalWrite(targetPin,LOW); // write the buzzer pin low to pull back the diaphram
    delayMicroseconds(delayValue); // wait againf or the calculated delay value
  }
}
//**************************************************************************


Heart in the Dark

EMF Detector

original project can be found here: http://www.aaronalai.com/emf-detector

//**************************************************************************
//http://www.aaronalai.com/emf-detector
 
int const targetPin = 0;
int val = 0;
void setup() {
  pinMode(targetPin, OUTPUT); // set a pin for buzzer output
}
void loop() {
 
val = analogRead(1);                    // reads in the values from analog 5 and
                                                                   //assigns them to val
  if(val >= 1){
 
    val = constrain(val, 1, 100);               // mess with these values                                       
    val = map(val, 1, 100, 1, 255);        // to change the response distance of the device
    analogWrite(1, val);                    // *note also messing with the resistor should change 
   buzz(val,10); 
                                                                   // the sensitivity
   }else{                                                     // analogWrite(pin11, val); just tuns on the led with 
                                                                  // the intensity of the variable val
    digitalWrite(targetPin,LOW);
    analogWrite(1, 0);                                     // the else statement is just telling the microcontroller
                                                                 // to turn off the light if there is no EMF detected
  }  
}
 
void buzz( long frequency, long length) {
  long delayValue = 1000000/frequency/2; // calculate the delay value between transitions
  //// 1 second's worth of microseconds, divided by the frequency, then split in half since
  //// there are two phases to each cycle
  long numCycles = frequency * length/ 1000; // calculate the number of cycles for proper timing
  //// multiply frequency, which is really cycles per second, by the number of seconds to 
  //// get the total number of cycles to produce
 for (long i=0; i < numCycles; i++){ // for the calculated length of time...
    digitalWrite(targetPin,HIGH); // write the buzzer pin high to push out the diaphram
    delayMicroseconds(delayValue); // wait for the calculated delay value
    digitalWrite(targetPin,LOW); // write the buzzer pin low to pull back the diaphram
    delayMicroseconds(delayValue); // wait againf or the calculated delay value
  }
}
//**************************************************************************

IR Sensor

IMG 9681ms.jpg

IR Sensor 002.gif

IMG 9676ms.jpg

//**************************************************************************
const int IR_Sensor = 2;
const int LEDs = 1;
void setup() {
  pinMode(IR_Sensor, INPUT);
  pinMode(LEDs, OUTPUT);
}
 
void loop() {
  if(digitalRead( IR_Sensor )){
    digitalWrite( LEDs,LOW );
  }else{
    digitalWrite( LEDs,HIGH );
    delay(10);
  }
}
//**************************************************************************



List of IR Hand Held Transmitters

Go to this link to get your transmitter codes.
List of IR Hand Held Transmitters

IMG 0646c.jpg

IR To Tone And LEDs

//**************************************************************************
/* 
Based on Adafruit tutorial http://learn.adafruit.com/ir-sensor/using-an-ir-sensor
and http://learn.adafruit.com/trinket-gemma-mini-theramin-music-maker
and https://learn.adafruit.com/trinket-gemma-ir-remote-control/using-ir-codes-1
by Mike Barela
*/
 
const int32_t B_1 = 0xC03F403F;
const int32_t B_2 = 0xC03F601F;
const int32_t B_3 = 0xC03F502F;
const int32_t B_4 = 0xC03F4837;
const int32_t B_5 = 0xC03F6817;
const int32_t B_6 = 0xC03F5827; 
const int32_t B_7 = 0xC03F443B;
const int32_t B_8 = 0xC03F641B;
const int32_t B_9 = 0xC03F542B; 
const int32_t B_star = 0xC03F4C33;
const int32_t B_0 = 0xC03F6C13;
const int32_t B_hash = 0xC03F5C23; 
const int32_t B_up = 0xC03F621D;
const int32_t B_left = 0xC03F4A35;
const int32_t B_ok = 0xC03F6A15;
const int32_t B_right = 0xC03F5A25; 
const int32_t B_down = 0xC03F6619;
 
// We need to use the 'raw' pin reading methods because timing is very important here 
// and the digitalRead() procedure is slower!
#define IRpin_PIN  PINB // ATTiny85 had Port B pins
#define IRpin      2    // IR sensor - TSOP38238 on Pin GPIO #2 / D2
#define SPEAKERPIN 0    // Piezo speaker on Trinket/Gemma Pin GPIO #1/D1
 
#define MAXPULSE    55000  // the maximum pulse we'll listen for - 5 milliseconds 
#define NUMPULSES    50  // max IR pulse pairs to sample
#define RESOLUTION     2  // // time between IR measurements
 
const long BigVal = 10200;
 
// we will store up to 100 pulse pairs (this is -a lot-, reduce if needed)
uint16_t pulses[NUMPULSES][2];   // pair is high and low pulse
uint16_t currentpulse = 0; // index for pulses we're storing
uint32_t irCode = 0;
 
void setup() {
  pinMode(IRpin, INPUT);       // Listen to IR receiver on Trinket/Gemma pin D2
  pinMode(SPEAKERPIN, OUTPUT); // Output tones on Trinket/Gemma pin D1
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(1, OUTPUT);
}
 
void loop() {
 
  irCode=listenForIR(); // Wait for an IR Code
 
  // Process the pulses to get our code
  for (int i = 0; i < 32; i++) {
    irCode=irCode<<1;
    if((pulses[i][0] * RESOLUTION)>0&&(pulses[i][0] * RESOLUTION)<500) {
      irCode|=0; 
    } else {
      irCode|=1;
    }
  }
//0xC03FE41B
  if(irCode==B_1)  {      // "1" on my remote, USE YOUR CODE HERE
      digitalWrite(1,HIGH);  
      beep(SPEAKERPIN,400,300);
      digitalWrite(1,LOW);
  } else if (irCode==B_2) { // "2", USE YOUR OWN HEX CODE HERE
      digitalWrite(1,HIGH);  
      beep(SPEAKERPIN,500,300);
      digitalWrite(1,LOW);
  } else if (irCode==B_3) { // "3", USE YOUR OWN HEX CODE HERE
      digitalWrite(1,HIGH);  
      beep(SPEAKERPIN,600,300);
      digitalWrite(1,LOW); 
  } else if (irCode==B_4) { // "4", USE YOUR OWN HEX CODE HERE
                digitalWrite(1,HIGH);
                beep(SPEAKERPIN, 400, 100);
                beep(SPEAKERPIN, 500, 100);
                beep(SPEAKERPIN, 600, 100);
                beep(SPEAKERPIN, 700,300); 
                digitalWrite(1,HIGH);
                delay(100);
                digitalWrite(1,LOW); 
                delay(100);
                digitalWrite(1,HIGH);
                delay(100);
                digitalWrite(1,LOW); 
                delay(100);
                digitalWrite(1,HIGH);
                delay(100);
                digitalWrite(1,LOW); 
  }
 
} // end loop
 
 
uint16_t listenForIR() {  // IR receive code
  currentpulse = 0;
  while (1) {
   unsigned int highpulse, lowpulse;  // temporary storage timing
   highpulse = lowpulse = 0; // start out with no pulse length 
 
   while (IRpin_PIN & _BV(IRpin)) { // got a high pulse
      highpulse++; 
      delayMicroseconds(RESOLUTION);
      if (((highpulse >= MAXPULSE) && (currentpulse != 0))|| currentpulse == NUMPULSES) {
        return currentpulse; 
      }
   }
   pulses[currentpulse][0] = highpulse;
 
   while (! (IRpin_PIN & _BV(IRpin))) { // got a low pulse
      lowpulse++; 
      delayMicroseconds(RESOLUTION);
      if (((lowpulse >= MAXPULSE) && (currentpulse != 0))|| currentpulse == NUMPULSES) {
        return currentpulse; 
      }
   }
   pulses[currentpulse][1] = lowpulse;
   currentpulse++;
  }
}
 
// Generate a tone on speakerPin - Trinket/Gemma/ATTiny85 compatible
void beep (unsigned char speakerPin, int frequencyInHertz, long timeInMilliseconds)
{   // http://web.media.mit.edu/~leah/LilyPad/07_sound_code.html
          int x;   
          long delayAmount = (long)(1000000/frequencyInHertz);
          long loopTime = (long)((timeInMilliseconds*1000)/(delayAmount*2));
          for (x=0;x<loopTime;x++)   
          {  
              digitalWrite(speakerPin,HIGH);
              delayMicroseconds(delayAmount);
              digitalWrite(speakerPin,LOW);
              delayMicroseconds(delayAmount);
          }  
}
//**************************************************************************

IR BuzzBuzzBot

Robots
Buz-Bot.gif
BuzBuzBot fig8 001.gif

 
//**************************************************************************
/* 
Based on Adafruit tutorial http://learn.adafruit.com/ir-sensor/using-an-ir-sensor
and http://learn.adafruit.com/trinket-gemma-mini-theramin-music-maker
and https://learn.adafruit.com/trinket-gemma-ir-remote-control/using-ir-codes-1
by Mike Barela
*/
 
// We need to use the 'raw' pin reading methods because timing is very important here 
// and the digitalRead() procedure is slower!
#define IRpin_PIN  PINB // ATTiny85 had Port B pins
#define IRpin      2    // IR sensor - TSOP38238 on Pin GPIO #2 / D2
#define SPEAKERPIN 0    // Piezo speaker on Trinket/Gemma Pin GPIO #1/D1
 
#define MAXPULSE    55000  // the maximum pulse we'll listen for - 5 milliseconds 
#define NUMPULSES    50  // max IR pulse pairs to sample
#define RESOLUTION     2  // // time between IR measurements
 
const long BigVal = 10200;
 
// we will store up to 100 pulse pairs (this is -a lot-, reduce if needed)
uint16_t pulses[NUMPULSES][2];   // pair is high and low pulse
uint16_t currentpulse = 0; // index for pulses we're storing
uint32_t irCode = 0;
 
void setup() {
  pinMode(IRpin, INPUT);       // Listen to IR receiver on Trinket/Gemma pin D2
  pinMode(SPEAKERPIN, OUTPUT); // Output tones on Trinket/Gemma pin D1
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(1, OUTPUT);
}
 
void loop() {
 
  irCode=listenForIR(); // Wait for an IR Code
 
  // Process the pulses to get our code
  for (int i = 0; i < 32; i++) {
    irCode=irCode<<1;
    if((pulses[i][0] * RESOLUTION)>0&&(pulses[i][0] * RESOLUTION)<500) {
      irCode|=0; 
    } else {
      irCode|=1;
    }
  }
//0xC03FE41B
  if(irCode==0xC03DC03F)  {      // "1" on my remote, USE YOUR CODE HERE
      digitalWrite(4,HIGH);  
      digitalWrite(3,LOW);
  } else if (irCode==0xC03DE01F  ) { // "2", USE YOUR OWN HEX CODE HERE
      digitalWrite(1,HIGH);
      digitalWrite(3,HIGH);
      digitalWrite(4,HIGH);  
  } else if (irCode==0xC03DD02F  ) { // "3", USE YOUR OWN HEX CODE HERE
      digitalWrite(3,HIGH);
      digitalWrite(4,LOW);
  } else if (irCode==0xC03DE817  ) { // "4", USE YOUR OWN HEX CODE HERE
      digitalWrite(1,LOW);
      digitalWrite(3,LOW);
      digitalWrite(4,LOW);
  }
 
} // end loop
 
 
uint16_t listenForIR() {  // IR receive code
  currentpulse = 0;
  while (1) {
   unsigned int highpulse, lowpulse;  // temporary storage timing
   highpulse = lowpulse = 0; // start out with no pulse length 
 
   while (IRpin_PIN & _BV(IRpin)) { // got a high pulse
      highpulse++; 
      delayMicroseconds(RESOLUTION);
      if (((highpulse >= MAXPULSE) && (currentpulse != 0))|| currentpulse == NUMPULSES) {
        return currentpulse; 
      }
   }
   pulses[currentpulse][0] = highpulse;
 
   while (! (IRpin_PIN & _BV(IRpin))) { // got a low pulse
      lowpulse++; 
      delayMicroseconds(RESOLUTION);
      if (((lowpulse >= MAXPULSE) && (currentpulse != 0))|| currentpulse == NUMPULSES) {
        return currentpulse; 
      }
   }
   pulses[currentpulse][1] = lowpulse;
   currentpulse++;
  }
}
 
// Generate a tone on speakerPin - Trinket/Gemma/ATTiny85 compatible
void beep (unsigned char speakerPin, int frequencyInHertz, long timeInMilliseconds)
{   // http://web.media.mit.edu/~leah/LilyPad/07_sound_code.html
          int x;   
          long delayAmount = (long)(1000000/frequencyInHertz);
          long loopTime = (long)((timeInMilliseconds*1000)/(delayAmount*2));
          for (x=0;x<loopTime;x++)   
          {  
              digitalWrite(speakerPin,HIGH);
              delayMicroseconds(delayAmount);
              digitalWrite(speakerPin,LOW);
              delayMicroseconds(delayAmount);
          }  
}
//**************************************************************************

Light Chasing BuzzBuzzBot


BuzBuzBotLightFinderBig.gif
This works much better in the dark.
Line BuzBuzBot.png
Line BuzBuzBot2.png

 
//**************************************************************************
int const LEDPin = 1;
int const LeftMoto = 3;
int const RightMoto = 4;
 
int ledState = LOW;             // ledState used to set the LED
long previousMillis = 0;        // will store last time LED was updated
 
long LEDinterval = 100;
 
void setup() {
  pinMode(LEDPin, OUTPUT);
  pinMode(LeftMoto, OUTPUT);
  pinMode(RightMoto, OUTPUT);
}
void loop() {
unsigned long currentMillis = millis();
int lightVal = analogRead(1);
lightVal = map(lightVal, 0, 1023, 0, 100);
  if(lightVal < 45) {
    digitalWrite(LeftMoto, 0); // No LeftMoto
    digitalWrite(RightMoto, 1);
    LEDinterval = 300;
  } else if( lightVal <55 ) {
    digitalWrite(LeftMoto, 1);
    digitalWrite(RightMoto, 1);
    LEDinterval = 600;
  } else  {
    digitalWrite(LeftMoto, 1);
    digitalWrite(RightMoto, 0); // No RightMoto
    LEDinterval = 100;
  }
 
    if(currentMillis - previousMillis > LEDinterval) {
    // save the last time you blinked the LED 
    previousMillis = currentMillis;   
 
    // if the LED is off turn it on and vice-versa:
    if (ledState == LOW)
      ledState = HIGH;
    else
      ledState = LOW;
 
    // set the LED with the ledState of the variable:
    digitalWrite(LEDPin, ledState);
  }
}
//**************************************************************************

IR Controlled Car





//**************************************************************************
/* 
Based on Adafruit tutorial http://learn.adafruit.com/ir-sensor/using-an-ir-sensor
and http://learn.adafruit.com/trinket-gemma-mini-theramin-music-maker
and https://learn.adafruit.com/trinket-gemma-ir-remote-control/using-ir-codes-1
by Mike Barela
*/
 
// We need to use the 'raw' pin reading methods because timing is very important here 
// and the digitalRead() procedure is slower!
#define IRpin_PIN  PINB // ATTiny85 had Port B pins
#define IRpin      2    // IR sensor - TSOP38238 on Pin GPIO #2 / D2
#define SPEAKERPIN 0    // Piezo speaker on Trinket/Gemma Pin GPIO #1/D1
 
#define MAXPULSE    55000  // the maximum pulse we'll listen for - 5 milliseconds 
#define NUMPULSES    50  // max IR pulse pairs to sample
#define RESOLUTION     2  // // time between IR measurements
 
const long BigVal = 10200;
 
// we will store up to 100 pulse pairs (this is -a lot-, reduce if needed)
uint16_t pulses[NUMPULSES][2];   // pair is high and low pulse
uint16_t currentpulse = 0; // index for pulses we're storing
uint32_t irCode = 0;
 
void setup() {
  pinMode(IRpin, INPUT);       // Listen to IR receiver on Trinket/Gemma pin D2
  pinMode(SPEAKERPIN, OUTPUT); // Output tones on Trinket/Gemma pin D1
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(1, OUTPUT);
}
 
void loop() {
 
  irCode=listenForIR(); // Wait for an IR Code
 
  // Process the pulses to get our code
  for (int i = 0; i < 32; i++) {
    irCode=irCode<<1;
    if((pulses[i][0] * RESOLUTION)>0&&(pulses[i][0] * RESOLUTION)<500) {
      irCode|=0; 
    } else {
      irCode|=1;
    }
  }
//0xC03FE41B
  if(irCode==0xC03FD42B)  {      // "1" on my remote, USE YOUR CODE HERE
              beep(SPEAKERPIN,500,300); 
                  int LED = 3;
                  int speed_val = 1;
                  for (long fadeValue = 100 ; fadeValue <= BigVal / 4 ; fadeValue += speed_val) { 
                      plex(LED,1); 
                      delayMicroseconds(fadeValue);             
                      plex(LED,0);    
                      delayMicroseconds(BigVal - fadeValue -1 );  
                      fadeValue *= 1.03;
                  }  
                  plex(LED,0);
                digitalWrite(1,HIGH);
                delay(300);
                digitalWrite(1,LOW);
    digitalWrite(3,LOW);
  } else if (irCode==0xC03FC43B) { // "2", USE YOUR OWN HEX CODE HERE
              beep(SPEAKERPIN,500,300); 
                  int LED = 4;
                  int speed_val = 1;
                  for (long fadeValue = 100 ; fadeValue <= BigVal / 2  ; fadeValue += speed_val) { 
                      plex(LED,1); 
                      delayMicroseconds(fadeValue);             
                      plex(LED,0);    
                      delayMicroseconds(BigVal - fadeValue -1 );  
                      fadeValue *= 1.03;
                  }  
                  plex(LED,0);
                digitalWrite(1,HIGH);
                delay(300);
                digitalWrite(1,LOW);
//0xC03FD42B
  } else if (irCode==0xC03FE41B) { // "3", USE YOUR OWN HEX CODE HERE
              beep(SPEAKERPIN,500,300); 
                  int LED = 5;
                  int speed_val = 1;
                  for (long fadeValue = 100 ; fadeValue <= BigVal / 4 ; fadeValue += speed_val) { 
                      plex(LED,1); 
                      delayMicroseconds(fadeValue);             
                      plex(LED,0);    
                      delayMicroseconds(BigVal - fadeValue -1 );  
                      fadeValue *= 1.03;
                  }  
                  plex(LED,0);
                digitalWrite(1,HIGH);
                delay(300);
                digitalWrite(1,LOW);
  } else if (irCode==0xC03FCC33) { // "4", USE YOUR OWN HEX CODE HERE
                beep(SPEAKERPIN, 400, 100);
                beep(SPEAKERPIN, 500, 100);
                beep(SPEAKERPIN, 600, 100);
                beep(SPEAKERPIN, 700,300); 
 
                digitalWrite(1,HIGH);
                delay(300);
                digitalWrite(1,LOW); 
  }
 
} // end loop
 
 
uint16_t listenForIR() {  // IR receive code
  currentpulse = 0;
  while (1) {
   unsigned int highpulse, lowpulse;  // temporary storage timing
   highpulse = lowpulse = 0; // start out with no pulse length 
 
   while (IRpin_PIN & _BV(IRpin)) { // got a high pulse
      highpulse++; 
      delayMicroseconds(RESOLUTION);
      if (((highpulse >= MAXPULSE) && (currentpulse != 0))|| currentpulse == NUMPULSES) {
        return currentpulse; 
      }
   }
   pulses[currentpulse][0] = highpulse;
 
   while (! (IRpin_PIN & _BV(IRpin))) { // got a low pulse
      lowpulse++; 
      delayMicroseconds(RESOLUTION);
      if (((lowpulse >= MAXPULSE) && (currentpulse != 0))|| currentpulse == NUMPULSES) {
        return currentpulse; 
      }
   }
   pulses[currentpulse][1] = lowpulse;
   currentpulse++;
  }
}
 
// Generate a tone on speakerPin - Trinket/Gemma/ATTiny85 compatible
void beep (unsigned char speakerPin, int frequencyInHertz, long timeInMilliseconds)
{	 // http://web.media.mit.edu/~leah/LilyPad/07_sound_code.html
          int x;	 
          long delayAmount = (long)(1000000/frequencyInHertz);
          long loopTime = (long)((timeInMilliseconds*1000)/(delayAmount*2));
          for (x=0;x<loopTime;x++)	 
          {	 
              digitalWrite(speakerPin,HIGH);
              delayMicroseconds(delayAmount);
              digitalWrite(speakerPin,LOW);
              delayMicroseconds(delayAmount);
          }	 
}
void plex( int sequence, int On )
{
  if( sequence <= 1 ) {
    if( On ) { digitalWrite(0, LOW ); } else { digitalWrite(0, HIGH); }    
  }else if( sequence == 2 ) {
    if( On ) { digitalWrite(1, HIGH); } else { digitalWrite(1, LOW ); } 
  }else if( sequence == 3 ) {
    if( On ) { digitalWrite(3, HIGH ); } else { digitalWrite(3, LOW); } 
  }else if( sequence == 4 ) {
    if( On ) { digitalWrite(3, HIGH); digitalWrite(4, HIGH); } else { digitalWrite(3, LOW); digitalWrite(4, LOW); } 
  }else if( sequence == 5 ) {
    if( On ) { digitalWrite(4, HIGH); } else { digitalWrite(4, LOW ); } 
  }
}
//**************************************************************************


Calibrated Line Following BuzzBuzzBot

//**************************************************************************
//**************************************************************************

Two Step Calibration Line Following BuzzBuzzBot

//**************************************************************************
//digital 0 is a PWM pin
//digital 1 is a PWM pin
//digital 2 is analog 1 
//digital 3 is analog 3 
//digital 4 is analog 2 
 
#define LED_Pin 1  
#define Threshold 200
int sensorValue_1 = 0;
int sensorValue_2 = 0;
int Mid_sensorValue = 0;
void setup() {
 
  sensorValue_1 = analogRead(1);
  pinMode(LED_Pin, OUTPUT);
  blinker(2);
  digitalWrite(LED_Pin, HIGH);
 
  int WaitingVal = 1;
    while(WaitingVal)
      {
        digitalWrite(LED_Pin, LOW);
        WaitingVal = !tapped();
      }
 
      sensorValue_2 = analogRead(1);
      blinker(3);
      digitalWrite(LED_Pin, HIGH);
    Mid_sensorValue = ( sensorValue_1 + sensorValue_2 ) / 2;
    pinMode(3, OUTPUT);
      digitalWrite(3, LOW); 
      pinMode(4, OUTPUT);
      digitalWrite(4, LOW); 
 
  }
 
void loop() {
  int sensorValue = analogRead(1);
  if(sensorValue > Mid_sensorValue) {
  digitalWrite(LED_Pin, HIGH);
  digitalWrite(3, LOW);
  digitalWrite(4, HIGH);
  }else{
  digitalWrite(LED_Pin, LOW);  
  digitalWrite(3, HIGH);
  digitalWrite(4, LOW);
  }
}
 
void blinker( int numberOfBlinks) 
{
  for (int i=0; i <= numberOfBlinks; i++)
  {
  digitalWrite(LED_Pin, HIGH);
  delay(300);
  digitalWrite(LED_Pin, LOW);
  delay(300);
  }
 
}
  boolean tapped() {
  int i = analogRead(2);
  if (i > Threshold)
    return true;
  else 
    return false;
}
//**************************************************************************

//**************************************************************************

5 LEDs On A Solderless Bread Board

EB-1-FiveLEDs.gif
IMG 9670MS.jpg

//**************************************************************************
const int Led1 = 2;
const int Led2 = 0;
const int Led3 = 1;
const int Led4 = 3;
const int Led5 = 4;
 
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 1 as an output.
  pinMode(Led1, OUTPUT);
  pinMode(Led2, OUTPUT);
  pinMode(Led3, OUTPUT);
  pinMode(Led4, OUTPUT);
  pinMode(Led5, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
  BlinkLED(Led1, false);
  BlinkLED(Led2, false);
  BlinkLED(Led3, true );
  BlinkLED(Led4, true );
  BlinkLED(Led5, true );
}
void BlinkLED( int LED, int Has_a_FET )
{
  if ( Has_a_FET ) { digitalWrite(LED, HIGH); } else { digitalWrite(LED, LOW); }
  delay(500);
  if ( Has_a_FET ) { digitalWrite(LED, LOW); }  else { digitalWrite(LED, HIGH); }
}
//**************************************************************************

Pulse Width Modulation All the LEDs by Bit Banging

//**************************************************************************
int LED = 1;
const long BigVal = 10200;
 
void setup() {
  for (int LED = 0 ; LED <= 4 ; LED += 1) {
    pinMode(LED, OUTPUT);
  }
    for (int i = 1 ; i <= 6 ; i += 1) { // flash 6 times
      for (int LED = 1 ; LED <= 5 ; LED += 1) {
            plex(LED,1);
      } 
      delay(300);
      for (int LED = 1 ; LED <= 5 ; LED += 1) {
            plex(LED,0);
      } 
      delay(300);
    }
}
 
void loop() {
fade(1); fade(2); fade(3); fade(4); fade(5); fade(2); fade(1); fade(3);
fade(5); fade(4); fade(2); fade(1); fade(3); fade(5); fade(1); fade(4);
}
 
void fade(int LED) 
{
  int speed_val = 1;
 
  for (long fadeValue = 1 ; fadeValue <= BigVal ; fadeValue += speed_val) { 
      plex(LED,1); 
      delayMicroseconds(fadeValue);             
      plex(LED,0);    
      delayMicroseconds(BigVal - fadeValue -1 );  
      fadeValue *= 1.07;
  }  
  plex(LED,1);
  delay(1000);  // ON delay
 
  for (long fadeValue = BigVal ; fadeValue > 0 ; fadeValue -= speed_val) { 
      plex(LED,1);   
      delayMicroseconds(fadeValue);             
      plex(LED,0);   
      delayMicroseconds(BigVal - fadeValue +1 );  
      fadeValue /= 1.07;
  }  
  plex(LED,0);
  delay(3000);  // OFF delay
}
 
void plex( int sequence, int On )
{
  if( sequence <= 1 ) {
    if( On ) { digitalWrite(0, LOW ); } else { digitalWrite(0, HIGH); }    
  }else if( sequence == 2 ) {
    if( On ) { digitalWrite(1, HIGH); } else { digitalWrite(1, LOW ); } 
  }else if( sequence == 3 ) {
    if( On ) { digitalWrite(2, LOW ); } else { digitalWrite(2, HIGH); } 
  }else if( sequence == 4 ) {
    if( On ) { digitalWrite(3, HIGH); } else { digitalWrite(3, LOW ); } 
  }else if( sequence == 5 ) {
    if( On ) { digitalWrite(4, HIGH); } else { digitalWrite(4, LOW ); } 
  }
}
//**************************************************************************



Program your Canon Intervalometer

//**************************************************************************
// This code will not compile
const  int Led1 = 2;
const int Led2 = 0;
const int Led3 = 1;
const int Led4 = 3;
const int Led5 = 4;
 
// the setup function runs once when you press reset or power the board
void setup() {
  pinMode(Led1, OUTPUT);
  pinMode(Led2, OUTPUT);
  pinMode(Led3, OUTPUT);
  pinMode(Led4, OUTPUT);
  pinMode(Led5, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
  digitalWrite(1, HIGH);
  delay(300);
  digitalWrite(1, LOW);
  //delay(300);
  digitalWrite(3, HIGH);
  delay(1000);
  digitalWrite(3, LOW);
  delay(5000);
 
  digitalWrite(1, HIGH);
  delay(300);
  digitalWrite(1, LOW);
  delay(300);
  digitalWrite(1, HIGH);
  delay(300);
  digitalWrite(1, LOW);
  //delay(300);
  digitalWrite(4, HIGH);
  delay(1000);
  digitalWrite(4, LOW);
  delay(5000);
 
 
  digitalWrite(1, HIGH);
  delay(300);
  digitalWrite(1, LOW);
  delay(300);
  digitalWrite(1, HIGH);
  delay(300);
  digitalWrite(1, LOW);
  delay(300);
  digitalWrite(1, HIGH);
  delay(300);
  digitalWrite(1, LOW);
  //delay(300);
  digitalWrite(4, HIGH);
  digitalWrite(5, HIGH);
  delay(1000);
  digitalWrite(4, LOW);
  digitalWrite(5, LOW);
  delay(5000);
}
//**************************************************************************

IR-Translator








Use The USB as a Button

USB-Button.gif

//**************************************************************************
//digital 0 is a PWM pin
//digital 1 is a PWM pin
//digital 2 is analog 1 
//digital 3 is analog 3 
//digital 4 is analog 2 
 
#define LED_Pin 1  
#define Threshold 200
 
void setup() {
  pinMode(LED_Pin, OUTPUT);
  }
 
void loop() {
  if(tapped()) {
  digitalWrite(LED_Pin, HIGH);
  }else{
  digitalWrite(LED_Pin, LOW);  
  }
}
 
  boolean tapped() {
  int i = analogRead(2);
  if (i > Threshold)
    return true;
  else 
    return false;
}
//**************************************************************************

Calibrate The Photo Resistor for Dark And Light

//**************************************************************************
//digital 0 is a PWM pin
//digital 1 is a PWM pin
//digital 2 is analog 1 
//digital 3 is analog 3 
//digital 4 is analog 2 
 
#define LED_Pin 1  
#define Threshold 200
int sensorValue_1 = 0;
int sensorValue_2 = 0;
int Mid_sensorValue = 0;
void setup() {
  sensorValue_1 = analogRead(1);
  pinMode(LED_Pin, OUTPUT);
  blinker(2);
  digitalWrite(LED_Pin, HIGH);
 
  int WaitingVal = 1;
    while(WaitingVal)
      {
        digitalWrite(LED_Pin, LOW);
        WaitingVal = !tapped();
      }
      sensorValue_2 = analogRead(1);
      blinker(3);
      digitalWrite(LED_Pin, HIGH);
    Mid_sensorValue = ( sensorValue_1 + sensorValue_2 ) / 2;
  }
 
void loop() {
  int sensorValue = analogRead(1);
  if(sensorValue > Mid_sensorValue) {
  digitalWrite(LED_Pin, HIGH);
  }else{
  digitalWrite(LED_Pin, LOW);  
  }
}
 
void blinker( int numberOfBlinks) 
{
  for (int i=0; i <= numberOfBlinks; i++)
  {
  digitalWrite(LED_Pin, HIGH);
  delay(300);
  digitalWrite(LED_Pin, LOW);
  delay(300);
  }
 
}
  boolean tapped() {
  int i = analogRead(2);
  if (i > Threshold)
    return true;
  else 
    return false;
}
//**************************************************************************

EB1 Emulate a USB Keyboard

This is from: https://github.com/adafruit/Adafruit-Trinket-USB/

KEYCODE_MOD_LEFT_CONTROL, 0x01
KEYCODE_MOD_LEFT_SHIFT, 0x02
KEYCODE_MOD_LEFT_ALT, 0x04
KEYCODE_MOD_LEFT_GUI, 0x08
KEYCODE_MOD_RIGHT_CONTROL, 0x10
KEYCODE_MOD_RIGHT_SHIFT, 0x20
KEYCODE_MOD_RIGHT_ALT, 0x40
KEYCODE_MOD_RIGHT_GUI, 0x80
 
// some more keycodes
KEYCODE_LEFT_CONTROL, 0xE0
KEYCODE_LEFT_SHIFT, 0xE1
KEYCODE_LEFT_ALT, 0xE2
KEYCODE_LEFT_GUI, 0xE3
KEYCODE_RIGHT_CONTROL, 0xE4
KEYCODE_RIGHT_SHIFT, 0xE5
KEYCODE_RIGHT_ALT, 0xE6
KEYCODE_RIGHT_GUI, 0xE7
KEYCODE_1, 0x1E
KEYCODE_2, 0x1F
KEYCODE_3, 0x20
KEYCODE_4, 0x21
KEYCODE_5, 0x22
KEYCODE_6, 0x23
KEYCODE_7, 0x24
KEYCODE_8, 0x25
KEYCODE_9, 0x26
KEYCODE_0, 0x27
KEYCODE_A, 0x04
KEYCODE_B, 0x05
KEYCODE_C, 0x06
KEYCODE_D, 0x07
KEYCODE_E, 0x08
KEYCODE_F, 0x09
KEYCODE_G, 0x0A
KEYCODE_H, 0x0B
KEYCODE_I, 0x0C
KEYCODE_J, 0x0D
KEYCODE_K, 0x0E
KEYCODE_L, 0x0F
KEYCODE_M, 0x10
KEYCODE_N, 0x11
KEYCODE_O, 0x12
KEYCODE_P, 0x13
KEYCODE_Q, 0x14
KEYCODE_R, 0x15
KEYCODE_S, 0x16
KEYCODE_T, 0x17
KEYCODE_U, 0x18
KEYCODE_V, 0x19
KEYCODE_W, 0x1A
KEYCODE_X, 0x1B
KEYCODE_Y, 0x1C
KEYCODE_Z, 0x1D
KEYCODE_COMMA, 0x36
KEYCODE_PERIOD, 0x37
KEYCODE_MINUS, 0x2D
KEYCODE_EQUAL, 0x2E
KEYCODE_BACKSLASH, 0x31
KEYCODE_SQBRAK_LEFT, 0x2F
KEYCODE_SQBRAK_RIGHT, 0x30
KEYCODE_SLASH, 0x38
KEYCODE_F1, 0x3A
KEYCODE_F2, 0x3B
KEYCODE_F3, 0x3C
KEYCODE_F4, 0x3D
KEYCODE_F5, 0x3E
KEYCODE_F6, 0x3F
KEYCODE_F7, 0x40
KEYCODE_F8, 0x41
KEYCODE_F9, 0x42
KEYCODE_F10, 0x43
KEYCODE_F11, 0x44
KEYCODE_F12, 0x45
KEYCODE_APP, 0x65
KEYCODE_ENTER, 0x28
KEYCODE_BACKSPACE, 0x2A
KEYCODE_ESC, 0x29
KEYCODE_TAB, 0x2B
KEYCODE_SPACE, 0x2C
KEYCODE_INSERT, 0x49
KEYCODE_HOME, 0x4A
KEYCODE_PAGE_UP, 0x4B
KEYCODE_DELETE, 0x4C
KEYCODE_END, 0x4D
KEYCODE_PAGE_DOWN, 0x4E
KEYCODE_PRINTSCREEN, 0x46
KEYCODE_ARROW_RIGHT, 0x4F
KEYCODE_ARROW_LEFT, 0x50
KEYCODE_ARROW_DOWN, 0x51
KEYCODE_ARROW_UP, 0x52
 
// multimedia keys
MMKEY_KB_VOL_UP, 0x80 // do not use
MMKEY_KB_VOL_DOWN, 0x81 // do not use
MMKEY_VOL_UP, 0xE9
MMKEY_VOL_DOWN, 0xEA
MMKEY_SCAN_NEXT_TRACK, 0xB5
MMKEY_SCAN_PREV_TRACK, 0xB6
MMKEY_STOP, 0xB7
MMKEY_PLAYPAUSE, 0xCD
MMKEY_MUTE, 0xE2
MMKEY_BASSBOOST, 0xE5
MMKEY_LOUDNESS, 0xE7
MMKEY_KB_EXECUTE, 0x74
MMKEY_KB_HELP, 0x75
MMKEY_KB_MENU, 0x76
MMKEY_KB_SELECT, 0x77
MMKEY_KB_STOP, 0x78
MMKEY_KB_AGAIN, 0x79
MMKEY_KB_UNDO, 0x7A
MMKEY_KB_CUT, 0x7B
MMKEY_KB_COPY, 0x7C
MMKEY_KB_PASTE, 0x7D
MMKEY_KB_FIND, 0x7E
MMKEY_KB_MUTE, 0x7F // do not use
 
// system control keys
SYSCTRLKEY_POWER, 0x01
SYSCTRLKEY_SLEEP, 0x02
SYSCTRLKEY_WAKE, 0x03

Use the EB1 like a MakeyMakey

Ultrasonic Range Finder

Ultrasonic Range Finder.gif

This is where you put it.
20150922112117.png
SEN136B5B https://www.arduino.cc/en/Tutorial/Ping

//**************************************************************************
 
// this constant won't change.  It's the pin number
// of the sensor's output:
const int pingPin = 0;
 
void setup() {
  pinMode(1, OUTPUT);
 
}
 
void loop() {
  // establish variables for duration of the ping,
  // and the distance result in inches and centimeters:
  long duration, inches, cm;
 
  // The PING))) is triggered by a HIGH pulse of 2 or more microseconds.
  // Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
  pinMode(pingPin, OUTPUT);
  digitalWrite(pingPin, LOW);
  delayMicroseconds(2);
  digitalWrite(pingPin, HIGH);
  delayMicroseconds(5);
  digitalWrite(pingPin, LOW);
 
  // The same pin is used to read the signal from the PING))): a HIGH
  // pulse whose duration is the time (in microseconds) from the sending
  // of the ping to the reception of its echo off of an object.
  pinMode(pingPin, INPUT);
  duration = pulseIn(pingPin, HIGH);
 
  // convert the time into a distance
  inches = microsecondsToInches(duration);
  cm = microsecondsToCentimeters(duration);
 
 
  if( inches > 20 ) {
    digitalWrite(1, HIGH);   // turn the LED on (HIGH is the voltage level)
  }else{  
  digitalWrite(1, LOW);    // turn the LED off by making the voltage LOW
  }
  delay(100);
}
 
long microsecondsToInches(long microseconds) {
  // According to Parallax's datasheet for the PING))), there are
  // 73.746 microseconds per inch (i.e. sound travels at 1130 feet per
  // second).  This gives the distance travelled by the ping, outbound
  // and return, so we divide by 2 to get the distance of the obstacle.
  // See: http://www.parallax.com/dl/docs/prod/acc/28015-PING-v1.3.pdf
  return microseconds / 74 / 2;
}
 
long microsecondsToCentimeters(long microseconds) {
  // The speed of sound is 340 m/s or 29 microseconds per centimeter.
  // The ping travels out and back, so to find the distance of the
  // object we take half of the distance travelled.
  return microseconds / 29 / 2;
}
//**************************************************************************

RGB

WS2811-and-EB1-001.png
Unnamed QQ Screenshot20150923124935.png


//**************************************************************************
#include <Adafruit_NeoPixel.h>
#define PIN 0
 
// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(1, PIN, NEO_GRB + NEO_KHZ800);
 
// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across
// pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input
// and minimize distance between Arduino and first pixel.  Avoid connecting
// on a live circuit...if you must, connect GND first.
 
void setup() {
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
}
 
void loop() {
int r = 0;
int g = 0;
int b = 0;
 
 
    for (int i=0; i <= 255; i++){
        strip.setPixelColor(0,r,g,i);
        strip.show();
        delay(15);
    }
    for (int i=255; i >= 0; i--){
        strip.setPixelColor(0,r,g,i);
        strip.show();
        delay(15);
    }
 
        for (int i=0; i <= 255; i++){
        strip.setPixelColor(0,i,g,b);
        strip.show();
        delay(15);
    }
    for (int i=255; i >= 0; i--){
        strip.setPixelColor(0,i,g,b);
        strip.show();
        delay(15);
    }
 
        for (int i=0; i <= 255; i++){
        strip.setPixelColor(0,r,i,g);
        strip.show();
        delay(15);
    }
    for (int i=255; i >= 0; i--){
        strip.setPixelColor(0,r,i,g);
        strip.show();
        delay(15);
    }
 
 
 
  }
//**************************************************************************

Flashing Colors Program

//**************************************************************************
#include <Adafruit_NeoPixel.h>
#define PIN 0
 
// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(1, PIN, NEO_GRB + NEO_KHZ800);
 
// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across
// pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input
// and minimize distance between Arduino and first pixel.  Avoid connecting
// on a live circuit...if you must, connect GND first.
 
void setup() {
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
}
 
void loop() {
int r = 0;
int g = 0;
int b = 0;
int delayTime = 300;
 
        strip.setPixelColor(0,r,g,255);
        strip.show();
        delay(delayTime);
 
        strip.setPixelColor(0,r,g,255);
        strip.show();
        delay(delayTime);
 
        strip.setPixelColor(0,255,g,b);
        strip.show();
        delay(delayTime);
 
        strip.setPixelColor(0,255,g,b);
        strip.show();
        delay(delayTime);
 
        strip.setPixelColor(0,r,255,g);
        strip.show();
        delay(delayTime);
 
 
        strip.setPixelColor(0,r,255,g);
        strip.show();
        delay(delayTime);
 
        strip.setPixelColor(0,random(0,255),random(0,255),random(0,255));
        strip.show();
        delay(delayTime);
 
}
//**************************************************************************

EB1 And ArduBlock

ArduBlock is a graphical programming language that can work with the EB1.
Graphical programming can be useful when you are getting started. There are many bracketing and other programing sintax errors that the graphical lasgage prevents from happening.

Basic Blink With ArduBlock

ArduBlock Blink.png


//**************************************************************************
void setup()
{
  pinMode( 1 , OUTPUT);
}
 
void loop()
{
  digitalWrite( 1 , HIGH );
  delay( 1000 );
  digitalWrite( 1 , LOW );
  delay( 1000 );
}
//**************************************************************************

Blink Like a Heart Monitor

EB-1-Hart.gif
ArduBlock Hart.png
This is a program to make the LEDs beat like that of a heart monitor.

//**************************************************************************
void setup()
{
  pinMode( 1 , OUTPUT);
}
 
void loop()
{
  digitalWrite( 1 , HIGH );
  delay( 100 );
  digitalWrite( 1 , LOW );
  delay( 100 );
  digitalWrite( 1 , HIGH );
  delay( 100 );
  digitalWrite( 1 , LOW );
  delay( 700 );
}
//**************************************************************************

Advanced Configurations

Using the EB1 as a Timer

EB1 Serial

 
//**************************************************************************
/*
  Blink for the EB1
 
  Turns on an LED on for one second, then off for one second, repeatedly.
  Sends On and Off to the serial port
 
  This example code is in the public domain.
 */
 
 
// we need to include the standard SoftwareSerial library
#include <SoftwareSerial.h>
 
// define our LED pin
int led = 1;
 
// since the EB1 does not have a hardware serial port
// we will define the a Software Serial port as Serial
SoftwareSerial Serial(3,4);
 
void setup() {                
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);
 
  // initialize the serial port
  Serial.begin(9600);     
}
 
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  Serial.println("On");      // send the word "On" to the serial port
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  Serial.println("Off");     // send the word "Off" to the serial port
  delay(1000);               // wait for a second
}
 
//**************************************************************************



 
//**************************************************************************
// we need to include the standard SoftwareSerial library
#include <SoftwareSerial.h>
 
// define our LED pin
int led = 1;
 
// since the EB1 does not have a hardware serial port
// we will define the a Software Serial port as Serial
SoftwareSerial Serial(3,4);
 
void setup() {                
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);
 
  // initialize the serial port
  Serial.begin(9600);     
}
 
void loop() {
  digitalWrite(led, HIGH);   
  int sensorValue = analogRead(1);
 
  const int maxVal = 60;
  int outputValue = map(sensorValue, 0, 1023, 0, maxVal);
  for(int x = 0; x <= maxVal + 1; x++ ) 
  {
    if( x < outputValue ) {
      Serial.print("-");
    } else if( x == outputValue ) {
      Serial.print(outputValue);
    } else if( x == maxVal + 1 ) {
      Serial.println(" ");
    } else if( x > outputValue ) {
      Serial.print(" ");
    } else {
      Serial.print("*");
    }
  }
  digitalWrite(led, LOW);
  delay(100);
}
 
//**************************************************************************


BuzzBuzzBot Teaching Concepts

computer

A computer is a device that can be instructed to carry out an arbitrary set of arithmetic or logical operations automatically.
The EB1 is a computer.

Cybernetics

https://en.wikipedia.org/wiki/Cybernetics
Closed Loop Control System
Not Open Loop










Trouble Shooting Suggestions

If the USB is having trouble recognizing the EB1.
Maybe you left it on battery power before putting it in the USB port.

Licenses

This project is licensed as CC-BY-SA 3.0. You are free to read, study, modify, redistribute, and create products out of our designs as long as you distribute your derivative work under the same license and attribute to us the original design.

Attributions / Inspirations

Although the general idea for this project was conceived many years ago, its implementation was greatly assisted by the work of Adafruit (Trinket Bootloader, Trinket), Digispark, MIT high-low tech, and all the other folks who have developed/contributed to USB implementation on the Atmel ATtiny processors.

Design Files

Please note:'This is still under development and the design definitely contains errors! KiCad Schematic and PCB files: EB1_P2.zip

Firmware: Under Development. It is possible to use firmware from similar open source designs. However, we have obtained our own USB PID through pid.codes and any EB1 released to the public will use this. You MUST obtain your own USB VID/PID for your projects unless you are using an EB1 manufactured by us. You MAY NOT release products using our USB VID/PID.

Arduino IDE Compatibility: Under Development. We are currently testing with Version 1.6.3 of the Official Arduino IDE. Installation instructions and files will be provided soon. The first releases will be "hacker friendly" but not necessarily ready for the general public.


Food For Thought

I need some help with the code
https://github.com/shirriff/Arduino-TV-B-Gone/blob/master/TVB.pde
https://github.com/shirriff/Arduino-TV-B-Gone
http://www.righto.com/2010/11/improved-arduino-tv-b-gone.html
http://www.righto.com/2009/12/tv-b-gone-for-arduino.html
https://learn.adafruit.com/tv-b-gone-kit
EMF-Detector
http://www.instructables.com/id/Arduino-EMF-Detector-1/
http://www.instructables.com/id/Arduino-EMF-Detector/
Door Lock
https://learn.adafruit.com/open-sesame-a-sms-controlled-door-lock
I2C LCD ?
WS2811
Servo
https://learn.adafruit.com/adafruit-pro-trinket-lipoly-slash-liion-backpack
3 x 3 x 3 LED Light Cube
https://learn.adafruit.com/free-wire-3x3x3-neopixel-cube
https://learn.adafruit.com/neopixel-cyber-falls
Drawer Lock
https://learn.adafruit.com/secret-knock-activated-drawer-lock
Trinket / Gemma IR Control
https://learn.adafruit.com/trinket-gemma-ir-remote-control
Trinket Fake USB Serial
https://learn.adafruit.com/trinket-fake-usb-serial
Trinket USB Keyboard
https://learn.adafruit.com/trinket-usb-keyboard
Trinket USB Volume Knob
https://learn.adafruit.com/trinket-usb-volume-knob
Trinket (& Gemma) Servo Control
https://learn.adafruit.com/trinket-gemma-servo-control
Super Small ATtinny
http://www.adafruit.com/products/1222



IR TV Be Gone
Camera, Foot pedal
AC Off when the Door is opened
Camera Time-lapse (Intervalometer)

Thinking About Contributing Or Just Want To Fix An Error

That would be great. We need all the help we can get. Send email to Tully@SamuraiCircuits.com. Mention what you want to do, so I know that you are not a spamming robot.


Short Link
www.samuraicircuits.com/eb1



701748973334-BuzzBuzzBot Light Chaser
701748973310-BuzzBuzzBot Remote
701748973297-BuzzBuzzBot Line follower

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox