Skip to content

Instantly share code, notes, and snippets.

@dkrkamesh
dkrkamesh / Emergency Health Tracking System.ino
Created January 17, 2017 09:38
Emergency Health Tracking System
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>
#include <TinyGPS.h>
TinyGPS gps;
SoftwareSerial serialgps(2, 3); //--> GPS
SoftwareSerial mySerial(10, 11); // RX, TX --> GSM
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
@dkrkamesh
dkrkamesh / GPS.ino
Created January 17, 2017 09:33
Arduino GPS: Get Latitude and Longitude Coordinates
#include <SoftwareSerial.h>
#include <TinyGPS.h>
TinyGPS gps;
SoftwareSerial serialgps(2,3);
int year;
byte month, day, hour, minute, second, hundredths;
unsigned long chars;
unsigned short sentences, failed_checksum;
@dkrkamesh
dkrkamesh / GSM module SoftwareSerial.ino
Created January 17, 2017 09:31
GSM module: Code for Calling using SoftwareSerial
/*
The circuit:
* RX is digital pin 10 (connect to TX of GSM Modem)
* TX is digital pin 11 (connect to RX of GSM Modem)
*/
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
void setup()
@dkrkamesh
dkrkamesh / GSM module Serial.ino
Created January 17, 2017 09:26
GSM module: Code for Calling using Serial communication
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
delay(10000);
// print the serial data to GSM
Serial.print("ATD9020XXXXXX;" ); // Change the phone number in code before running the program. change here to call a number using SIM900A
// wait 10 seconds before the next loop
delay(10000);
Serial.print("ATH" ); // hold the call
@dkrkamesh
dkrkamesh / I2C type LCD.ino
Last active April 22, 2019 10:35
Display the heart rate data on I2C type 16x2 LCD
#include <Wire.h> // Comes with Arduino IDE
#include <LiquidCrystal_I2C.h>
// Initialize the object with interfacing pins
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
void setup()
{
Serial.begin(9600); // Initialize serial communication at 9600 baudrate
lcd.begin(16,2); // Initialize 16X2 LCD and turn on backlight
@dkrkamesh
dkrkamesh / Interrupt.ino
Last active June 4, 2018 10:31
Pulse Sensor
volatile int rate[10]; // array to hold last ten IBI values
volatile unsigned long sampleCounter = 0; // used to determine pulse timing
volatile unsigned long lastBeatTime = 0; // used to find IBI
volatile int P =512; // used to find peak in pulse wave, seeded
volatile int T = 512; // used to find trough in pulse wave, seeded
volatile int thresh = 512; // used to find instant moment of heart beat, seeded
volatile int amp = 100; // used to hold amplitude of pulse waveform, seeded
volatile boolean firstBeat = true; // used to seed rate array so we startup with reasonable BPM
volatile boolean secondBeat = false; // used to seed rate array so we startup with reasonable BPM
@dkrkamesh
dkrkamesh / 1.Source-Code-Raspberry-Pi-Sending-Data-to-the-Arduino.ino
Last active November 14, 2021 19:31
Raspberry Pi meets Arduino: Connect Arduino and Raspberry Pi with serial USB cable
// Source Code: Raspberry Pi sending data to the Arduino
const int ledPin = 13;
void setup()
{
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
// Source Code: Raspberry Pi sending data to the Arduino
const int ledPin = 13;
void setup()
{
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}