Skip to content

Instantly share code, notes, and snippets.

View vishnumaiea's full-sized avatar
🏠
At Work

Vishnu Mohanan vishnumaiea

🏠
At Work
View GitHub Profile
@vishnumaiea
vishnumaiea / Passing-Member-Function-to-Global-Functions.cpp
Last active October 9, 2020 06:43
This example shows how you can pass a member function to a global function as a pointer.
//-------------------------------------------------------------//
#include <iostream>
using namespace std;
//-------------------------------------------------------------//
//the type of the callback
typedef void (*func)(void); //the only pointer type the global accetps
@vishnumaiea
vishnumaiea / Larson-Scanner.ino
Created April 17, 2020 15:10
Larson Scanner code for ESP32
#define LED_DELAY 45
int ledArray[10] = {0, 15, 2, 4, 5, 18, 19, 21, 22, 23};
void setup() {
for(int i=0; i<10; i++) {
pinMode(ledArray[i], OUTPUT);
digitalWrite(ledArray[i], HIGH); //make all HIGH for now
}
}
@vishnumaiea
vishnumaiea / GSM-Routines.cpp
Last active April 15, 2020 15:19
GSM-Routines
//========================================================================//
// These are some useful GSM routines or functions written for the Arduino
// (Due) platform and SIM800L GSM module.
// It extensively relies on Arduino String class. But it would be easy to
// port them to a cstring compatible one.
// The code is straight forward and well commented.
//
// Different serial ports are used for GSM and debugging messages.
// debugPort is your ASCII serial monitor for debugging
// gsmPort is where you have your GSM module
//=========================================================================//
// //
// ## R30X Fingerprint Sensor Library Example 1 ## //
// //
// Filename : R30X_Fingerprint_Test.ino //
// Description : Arduino compatible test program for Fingerprint_VMA //
// library for R30X series fingerprint sensors. //
// Library version : 1.0 //
// Author : Vishnu M Aiea //
//=========================================================================//
double sensorValue;
int avg = 0;
int led = 13;
int flag = 0;
float findVolt();
float volt;
unsigned long endTime = 0;
//========================================================================//
// //
// ## ISL1208-RTC-Library Arduino Example ## //
// //
// ISL1208 is an RTC from Intersil. This is an Arduino compatible //
// library for ISL1208 //
// //
// Filename : ISL1208_RTC_Test.ino //
// Description : Example Arduino sketch. //
@vishnumaiea
vishnumaiea / CIRCUITSTATE-General-Group-Rules-and-Guidelines.txt
Created April 19, 2019 13:24
CIRCUITSTATE - General Group Rules and Guidelines
*CIRCUITSTATE : GENERAL GROUP RULES & GUIDELINES*
Version 1.7, 06:52 PM 19-04-2019, Friday
-----------------------------------------------
1. *CIRCUITSTATE* is an electronics and engineering related group/channel. So your posts such as images, links, videos, doubts etc. must come under any of the *scientific or technical disciplines*. Please refrain from posting content related to any other subjects.
2. Promotional posts, ads, deceptive links, hate speech, nudity etc. are not allowed, OR *spamming is not allowed*. Spammers will be *removed/blocked/reported* immediately by admins.
3. *Be nice to people*. At the front of all mobile screens are real people with emotions and ideals. Always address people you might not know with "Sir" or "Mr. <name>", or in a *mutually respected manner*.
@vishnumaiea
vishnumaiea / GA6_GSM.ino
Last active July 22, 2021 16:48
AT command tester for Goouuu Tech IOT-GA6 GSM/GPRS module with Arduino Due
//================================================================//
// //
// ## GA6 GSM Module AT Command Tester ## //
// //
// Send AT commands to GA6 GSm module. This program was written //
// for Arduino Due with Serial1 port for GSM module and Serial0 //
// port for debugging. AT commands use CR as delimiter. You may //
// also send a NL. If you're not accepting CR from terminal, an //
// explicit CR should be sent after the command. NL is optional. //
// AT command responses are terminated by CRLF by default. //
//=========================================================================//
#include "Fingerprint_VMA.h"
//=========================================================================//
//constructor for SoftwareSerial interface
#if defined(__AVR__) || defined(ESP8266)
Fingerprint_VMA::Fingerprint_VMA (SoftwareSerial *ss, uint32_t password, uint32_t address) {
@vishnumaiea
vishnumaiea / R307_Fingerprint_Sensor.ino
Created March 20, 2019 09:36
Test code to interface R307 Fingerprint Sensor with Arduino Due
//======================================================================//
//
// Description : Test code to interface R307 Fingerprint Sensor with
// Arduino Due. Due's second UART port (Serial1) is used
// to interface the R307.
//
//======================================================================//
void setup() {
Serial.begin(9600);