Posts

Bluetooth interfacing with arduino

Image
Bluetooth interfacing with Arduino Components require: Arduino uno HC06/HC05 Connecting cables Red LED 1k Resistor Example projects: ROBOT controlling with app Home automation with app 2 arduino communication RGB color change of LED Connections: VCC=5v GND=GND RX=Tx Tx=Rx key=keep Open State=keep Open download app here.. To learn how to interface led with Arduino LEARN LED INTERFACING WITH ARDUINO Arduino Code: /* It's a simple sketch which waits for a character on serial and in case of a desirable character, it turns an LED on/off. Possible string values: a (to turn the LED on) b (tor turn the LED off) */ char junk; String inputString=""; void setup() // run once, when the sketch starts { Serial.begin(9600); // set the baud rate to 9600, same should be of your Serial Monitor pinMode(13, OUTPUT); } void loop() { if(Serial.available()){ while(Serial.available()) { c

Analog input Analog output of arduino

Image
analogWrite() Arduino uno has 8 bit DAC Actually analog output of Arduino is PWM. On most Arduino boards (those with the ATmega168 or ATmega328P), this function works on pins 3, 5, 6, 9, 10, and 11. On the Arduino Mega, it works on pins 2 - 13 and 44 - 46. Older Arduino boards with an ATmega8 only support analogWrite()   on pins 9, 10, and 11. Syntax analogWrite(pin, value) Example Code Sets the output to the LED proportional to the value read from the potentiometer.(Note:-make correction analog pin=A3 ). int ledPin = 9 ; // LED connected to digital pin 9 int analogPin = 3 ; // potentiometer connected to analog pin 3 int val = 0 ; // variable to store the read value void setup () { pinMode (ledPin, OUTPUT ); // sets the pin as output } void loop () { val = analogRead (analogPin); // read the input pin analogWrite (ledPin, val / 4 ); // analogRead values go from 0 to 1023, analogWrite values from 0 to 255 }

Analog input and Serial Output(See output on serial monitor)

Arduino uno has 10 bit ADC(Analog to Digital converter).(Gives 0 to 1023 values as output.) Reads the value from the specified analog pin. The Arduino board contains a 6 channel (8 channels on the Mini and Nano, 16 on the Mega).  Resolution can be calculated as maximum 10 bit value divide by input voltage (example. for 5 volts input resolution will be [5volts/1024 units] i.e .0049volts/unit.). NOTE:-The input range and resolution can be changed using   analogReference() . Syntax:- analogRead(pin); Returns int(0 to 1023)       Example Code The code reads the voltage on analog Pin and displays it. int analogPin = 3 ; // potentiometer wiper (middle terminal) connected to analog pin 3 // outside leads to ground and +5V int val = 0 ; // variable to store the value read void setup () { Serial . begin ( 9600 ); // setup serial } void loop () { val = analogRead (analogPin); // read the input pin

LED BLINKING

Image
Follow this video for circuit diagram  COMPONENTS LIST:           1. Arduino uno board 2. LED 3. Resistor 100 ohm 4. Connection cables . LED: ARDUINO CODE: void setup () {   pinMode (13  OUTPUT ); } void loop () {   digitalWrite (13, HIGH );   // turn the LED on (HIGH is the voltage level)   delay(1000);                       // wait for a second   digitalWrite (13, LOW );    // turn the LED off by making the voltage LOW   delay(1000);                       // wait for a second }

T3_3:-How to simulate Arduino on Proteus.

Image

ARDUINO BOARD INFORMAION

Image
SPECIFICATION OF ARDUINO USO BOARD: MCU: ATMega 328 SIX ANALOG INPUT PINS /ADC                  (A0,A1,A2,A3,A4,A5). 14 DIGITAL GPIO'S                                         (0 TO 13) SIX ANALOG OUTPUT PINS/DAC /PWM   (3,5,6,9,10,11). ONE SPI PORT                                                 (13=SCK,12=MISO,11=MOSI). ONE UART PORT                                            (0=RxD,1=TxD) ONE I2C PORT                                                 (A4=SDA,A5=SDL)  FOR MORE DETAILS OF ARDUINO UNO BOARD CLICK ON IMAGE GIVEN BELOW  THERE ARE NUMBER OF BOARDS OF ARDUINO  1.ARDUINO MEGA 2.ARDUINO UNO 3.ARDUINO MICRO 4.ARDUINO NANO 5.ARDUINO PRO MICRO 6.ARDUINO PRO MINI AND MUCH MORES WE WILL SEE LATER ON ONCE YOU GET FAMILIAR WITH ARDUINO

Basic of Arduino...RGB led interfacing with Arduino(practical use of fading).