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 / Gist_Code_Export.ino
Last active February 4, 2019 12:44
This exports Gist code to plan HTML
noInterrupts (); //temporarily disable interrupts
set_sleep_mode(SLEEP_MODE_PWR_DOWN); // Choose our preferred sleep mode:
sleep_enable(); // Set sleep enable (SE) bit:
ADCSRA = 0; //disable ADC
power_all_disable(); //disables all modules
digitalWrite(LED_PIN, LOW); //turn LED off to indicate sleep
interrupts(); //re-enable interrupts
sleep_mode(); //goes to sleep
@vishnumaiea
vishnumaiea / MicroSD_Read_Write.ino
Last active December 9, 2018 13:55
Code to read from and write to a microSD card from Arduino.
//-----------------------------------------------//
// Writing to and reading from a micro SD card.
//
// Type "i" or "I" in the serial terminal to
// initialize the card.
//
// Type "n" to open/create a new file and
// write to it.
//
@vishnumaiea
vishnumaiea / MicroSD_Card_Init.ino
Last active December 9, 2018 14:16
Catalex Micro SD card module initialization code for Arduino.
// -----------------------------------------------------//
//
// Micro SD Card initialization code.
// Type "i" or "I" in the serial terminal to
// initialize the card.
//
// Author : Vishnu M Aiea
// Web : www.vishnumaiea.in
// IST 4:04 PM 28-02-2017, Tuesday
//
@vishnumaiea
vishnumaiea / GPS_Example.ino
Last active December 8, 2018 08:03
GPS Module Code
#include <SoftwareSerial.h>
/***********************************************************************
Copyright (c) 2015 Vishnu M Aiea
Original Source : www.rhydoLabz.com
Date created : 06-02-2015
Last modified : 06-02-2015
Contact : [email protected]
Website : www.vishnumaiea.in
//========================================================================//
//
// This program demonstrates how you can use the C++'s inbuilt <string>
// library to pass strings to functions. You can send strings as objects
// or as pointers. The <string> library seems compatible with FreeRTOS.
// I had to do this becasue the Arduino's String class did not work well
// with FreeRTOS on STM32 Nucleo boards. I was unable to create String
// objects or pass them to functions.
//
//========================================================================//
// //
// ILI9481 3.2" 320 x 480 TFT LCD Driver for ESP32 //
// //
// Author : Vishnu M Aiea //
// GitHub : https://github.com/vishnumaiea //
// License : GNU GPL v3 //
// Date Created : IST 04:07:07 PM, 30-10-2017, Monday //
// Last Modified : 07:24:42 PM, 12-11-2017, Sunday //
//-----------------------------------------------------------//
// A driver library for ILI9481, 3.2", 320 x 480 display.
// Author : Vishnu M Aiea
// Website : www.vishnumaiea.in
//-----------------------------------------------------------//
#include <driverlib.h>
#define CS_PIN GPIO_PORT_P10, GPIO_PIN2 //P10.2
//Social links
//YouTube- www.youtube.com/TapendraMandal
//Facebook- www.facebook.com/TapendraMandal
//Twitter- www.twitter.com/TapendraMandal
//Instagram- www.instagram.com/TapendraMandal
//Snapchat- www.snapchat.com/TapendraMandal
@vishnumaiea
vishnumaiea / Freehand-Algorithm.pde
Last active September 14, 2017 07:02
Freehand algorithm for my Mini CNC Plotter
//=========================================================================//
//
// -- Frehand plotting algorithm --
//
// Author : Vishnu M Aiea
// Date created : 11:50:01 PM, 23-06-2017, Friday
// Last modified : 12:28 PM 14-09-2017, Thursday
//
// It now works for every solid image.
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
#define lenght 16.0
unsigned int peace;
unsigned char b;
//int count = 0; //remove this line if you want it to run more than once
int aft=1;
int buz = 6;
int motor = 7; //motor switch