Arduino practical directly can work
A. DHT11 (Temperature & Humidity Sensor) display to Arduino LCD
https://www.electronicshub.org/dht11-humidity-sensor-arduino/
1. Upload the code to arduino uno.
2. Create wiring connections between the arduino uno, potentiometer and DHT 11.
3. Include DHT library.
4. Contrast of the LCD is controlled by potentiometer.
LCD display temperature in 28 degree celcius and humidity at 48%
B. Interface NEO-6M GPS Module with Arduino
https://microcontrollerslab.com/neo-6m-gps-module-arduino-tutorial/
1. Download Tiny Gps library
2. Upload arduino Code
3. Include Tiny GPS Library
4. Create connections between GPS - Arduino
GPS-Arduino
Vcc - 5V
Gnd-Gnd
Rx- pin 6
Tx- Pin 7
5. Red led blinks means position lock. (1 - 2 minutes)
6. No led blinks means still searching for satellite.
GPS Location acquired.
GPS and Arduino Connections
C. GSM 900A
Working
Working
Coding
/*************************************************************
Blynk is a platform with iOS and Android apps to control
ESP32, Arduino, Raspberry Pi and the likes over the Internet.
You can easily build mobile and web interfaces for any
projects by simply dragging and dropping widgets.
Downloads, docs, tutorials: https://www.blynk.io
Sketch generator: https://examples.blynk.cc
Blynk community: https://community.blynk.cc
Follow us: https://www.fb.com/blynkapp
https://twitter.com/blynk_app
Blynk library is licensed under MIT license
This example code is in public domain.
*************************************************************
Attention! Please check out TinyGSM guide:
https://tiny.cc/tinygsm-readme
Change GPRS apm, user, pass, and Blynk auth token to run :)
Feel free to apply it to any other example. It's simple!
*************************************************************/
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
/* Fill in information from Blynk Device Info here */
#define BLYNK_AUTH_TOKEN "aWOmy281GDoxgbWxtBjoI7emyabTiCfo"
#define BLYNK_TEMPLATE_ID "TMPL6NC4lJTrn"
#define BLYNK_TEMPLATE_NAME "KILLSWITCH"
// Select your modem:
//#define TINY_GSM_MODEM_SIM800
#define TINY_GSM_MODEM_SIM900
//#define TINY_GSM_MODEM_M590
//#define TINY_GSM_MODEM_A6
//#define TINY_GSM_MODEM_A7
//#define TINY_GSM_MODEM_BG96
//#define TINY_GSM_MODEM_XBEE
// Default heartbeat interval for GSM is 60
// If you want override this value, uncomment and set this option:
//#define BLYNK_HEARTBEAT 30
#include <TinyGsmClient.h>
#include <BlynkSimpleTinyGSM.h>
// Your GPRS credentials
// Leave empty, if missing user or pass
char auth[] = "aWOmy281GDoxgbWxtBjoI7emyabTiCfo";
char apn[] = "unet"; //celcom3G for redone, unet for Maxis,
char user[] = "";
char pass[] = "1234";
// Hardware Serial on Mega, Leonardo, Micro
#define SerialAT Serial1
// or Software Serial on Uno, Nano
#include <SoftwareSerial.h>
SoftwareSerial SerialAT(10, 9); // GSM Rx to Arduino pin 10, GSM Tx to Arduino Pin 9
TinyGsm modem(SerialAT);
void setup()
{
// Debug console
Serial.begin(9600);
delay(10);
// Set GSM module baud rate
SerialAT.begin(9600);
delay(3000);
// Restart takes quite some time
// To skip it, call init() instead of restart()
Serial.println("Initializing modem...");
modem.restart();
// Unlock your SIM card with a PIN
modem.simUnlock("1234");
Blynk.begin(BLYNK_AUTH_TOKEN, modem, apn, user, pass);
}
void loop()
{
Blynk.run();
}
No comments:
Post a Comment