Friday 22 April 2016

Flame Detection Primer

This schematic provides a method of connecting a flame sensor to an Arduino. The code can be used to activate a buzzer.

Flame sensor to A5
Buzzer to Digital 8.

As the code establishes serial communication, you can use the serial monitor to watch the input value to A5 as it changes.
Altering the 600 in the line [ if(val>=600) ] (Reading "if Val is greater or equal to 600") will change the point at which the buzzer sounds.

The code...

int flame=A5; //Define the flame sensor input A5;
 int Beep=8;  //Buzzer to D8
 int val=0;   
 void setup() 
{ pinMode(Beep,OUTPUT); 
 pinMode(flame,INPUT); 
 Serial.begin(9600);//set the baudrate to 9600
                    //this establishes serial communication ;
 } 
void loop() { 
val=analogRead(flame);//analog read the voltage ;
Serial.println(val);
 if(val>=600) //if the analog data large than 600 ;
              //You can of course change this value... ;
 { 
digitalWrite(Beep,HIGH); 
} else
 { digitalWrite(Beep,LOW); }
 }


Tuesday 29 March 2016

Sensing a button press




An explanation of a method to use a button. The skech uses pins 7 and 11. Pin 7 is used to sense the input voltage created when the button is either pressed or released. Pin 11 is used to write to the LED.

The arduino sketch is as follows...

int ledpin=11;//define the LED connect to Pin11;
int inpin=7;//define the button connect to Pin7
int val;//val to store the data
void setup()
{
pinMode(ledpin,OUTPUT);//define the LED Pin to OUTPUT;
pinMode(inpin,INPUT);//define the button Pin to INPUT;
}
void loop()
{
val=digitalRead(inpin);//digital read the button pin
if(val==LOW)//if the button pressed;
{ digitalWrite(ledpin,LOW);}//turn off the LED
else
{ digitalWrite(ledpin,HIGH);}//if not pressed, turn on the LED
}

An explanation of the code and a schematic diagram are available.
Further reading about buttons can be found on the Arduino Site Button Page



Monday 7 March 2016

Basic Arduino Development Kit through CSC

Our Wednesday "Activities" group has seen numbers grow an we now have a group of twelve regular Arduino students including some Year 9 students. What will they design and make as they progress through the school?

All of our activities students will receive a basic Arduino development kit like the one shown.

The kit has a range of experiments to lead you through what can be done with Arduino.

The kit contains:
USB Cable(Type B) x1, Printed guide book x1, 5mm Red LED x5, 5mm Green LED x5, 5mm,Yellow LED x5, RGB LED(Common cathode) x2, 220 OHM Resistor x20, 680 OHM resistor x10, 1K Resistor x10, 10K Resistor x10, 470K Resistor x10, 390PF cermic capacitors x2, IN4007 Diode x2, Buzzer x1, Tilt Switch x2, 50K Potentiometer x1, Photoresister sensor x2, LM35 Temperature sensor x1, 4-Digi LED(common cathode) x1, Four Digit Numeric Display(commend cathode) x1, Flame Sensor x1, 1602 LCD Display Module(Blue) x1, 40 Pin 20cm Dule Male Jumper Wire x1, Basic Breadboard x1, 9V Battery Connector x1, Tact Switch x5, Clear Case x1.