Skip to content

Instantly share code, notes, and snippets.

View techzeero's full-sized avatar
🎯
Focusing

Techzeero techzeero

🎯
Focusing
View GitHub Profile
/*
Arduino String Manipulation
For more details, visit: https://techzeero.com/arduino-tutorials/arduino-string-functionality/
*/
void setup() {
char my_str[] = "I love arduino and programming"; // create a string
Serial.begin(9600);
// (1) print the string
/*
Arduino String Functionality
For more details, visit: https://techzeero.com/arduino-tutorials/arduino-string-functionality/
*/
void setup() {
char my_str[] = "Hello";
Serial.begin(9600);
Serial.println(my_str);
}
/*
Arduino String Functionality
For more details, visit: https://techzeero.com/arduino-tutorials/arduino-string-functionality/
*/
void setup() {
char my_str[6]; // an array of 5 character string
Serial.begin(9600);
my_str[0] = 'H';
my_str[1] = 'e';
@techzeero
techzeero / Relay with Arduino and LDR.ino
Created December 19, 2019 11:43
Relay with Arduino and LDR
/*
Relay with Arduino and LDR
For more details, visit:
*/
int sensorPin = A0;
int relayPin = 9;
void setup()
{
/*
IR Receiver Control Signals Through Arduino
For more details, visit: https://techzeero.com/arduino-tutorials/control-tv-with-an-arduino/
*/
#include<IRremote.h> //IR remote control library
const int numberOfKeys = 5;
int firstKey = 4; //first pin of the 5 sequential pins connected to buttons
boolean buttonState[numberOfKeys];
/*
Scrolling Text on LCD 16x2
For more details, visit: https://techzeero.com/arduino-tutorials/how-to-use-an-lcd-display-with-arduino/
*/
#include<LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
int numRows = 2;
int numCols = 16;
/*
Turning the Cursor and Display On or Off
For more details, visit: https://techzeero.com/arduino-tutorials/how-to-use-an-lcd-display-with-arduino/
*/
#include<LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
void setup()
/*
Display Double-Height Characters on 16×2 LCD
For more details, visit: https://techzeero.com/arduino-tutorials/custom-characters-on-16x2-lcd/
*/
#include<LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
byte glyphs[5][8]={
/*
Display Custom Characters on 16×2 LCD
For more details, visit: https://techzeero.com/arduino-tutorials/custom-characters-on-16x2-lcd/
*/
#include<LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
byte smile[8] = {0b00000,0b01010,0b00000,0b00000,0b10001,0b01110,0b00000,0b00000};
/*
DS3231 RTC and LCD with Arduino
For more details, visit: https://techzeero.com/arduino-tutorials/ds3231-rtc-with-arduino-arduino-real-time-clock/
*/
#include <DS3231.h>
#include <LiquidCrystal.h> // includes the LiquidCrystal Library
DS3231 rtc(SDA, SCL);