Posts with «arduino tutorials» label

Temperature logger using arduino and thingspeak

Hello Arduino lovers,

In this tutorial, we are making a temperature logger using arduino and thingspeak.
Let's start

Things required:

  1. Arduino Uno
  2. LM35
  3. Sim900 module
  4. Internet pack 
  5. Thinkspeak account




Make connections as given in the diagram. Connect Tx of GSM module to pin number 7 of arduino board and Rx of of GSM module to pin number 8 of arduino uno and ground should be common between these two.
Output of LM35 should be connected to A0 of arduino board.
Arduino Uno GSM module LM35
Pin no. 7 Tx
Pin no. 8 Rx
Pin no. A0 Output of Lm35
Download code from link below
Now, upload the code

Video:

Hope, you guys had enjoyed the video

Thanks for visiting my blog



Serial communication with arduino

In this post, we will learn how to serial communicate other device or arduino suing serial communication.

Introduction:

Serial communication (RS-232) is widely used communication for data transfer. It just uses three wires: Rx, Tx and GND

  In serial communication, 8/9 -bit is transferred through a single wire. The data frame is like this:

Start bit > Data fields (8 or 9 bit data) > Stop bit


Speed of data transfer is measured in terms of baud rate or bps:

Standard is: 9600 baud rate, none parity bit and one stop bit.
The baud rate should be same for both the devices. Any mismatch in the baud rate and the data will not be transmitted properly.
Bluetooth module (HC-05), Zigbee, GMS module, GPS module all these module uses serial communication. In fact, for communication between two microcontroller, we can use serial communication.

Connections:

Arduino                                                      Device
Tx            ===============>               Rx
Rx            ===============>               Tx
GND        ===============>               GND

For interfacing arduino with pc/ laptop, we need terminal software like bray's terminal. 

Just plug in the arduino in your pc/ laptop upload the program below and open terminal software.
Open comport in terminal sofware. The comport should be of arduino.

/* Program starts here */

void setup() {
Serial.begin(9600);   // starts serial communication @9600 bps
}

void loop() {
Serial.print("ARDUINO");   // serially print arduino
//Serial.println("ARDUINO");   // serially print arduino in new line

delay(1000);  // dealy of 1000ms
}

/* Program ends here */

Check this video: