ESP8266 Arduino Webserver Tutorial

Featured Video Play Icon

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798#include <SoftwareSerial.h>   #define DEBUG true   SoftwareSerial esp8266(2,3); // make RX Arduino line is pin 2, make TX Arduino line is pin 3.                              // This means that you need to connect the TX line from the esp to the Arduino’s […]

Details

LCD Tutorial

Featured Video Play Icon

1234567891011121314151617181920212223242526272829/* * Arduino LCD Tutorial * * Crated by Dejan Nedelkovski, * www.HowToMechatronics.com * */ #include <LiquidCrystal.h> // includes the LiquidCrystal Library LiquidCrystal lcd(1, 2, 4, 5, 6, 7); // Creates an LC object. Parameters: (rs, enable, d4, d5, d6, d7) void setup() {  lcd.begin(16,2); // Initializes the interface to the LCD screen, and specifies […]

Details

RC522 RFID module with an Arduino

Featured Video Play Icon

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134/* Simple RFID Arduino Sketch(RC522) Created by Yvan / https://Brainy-Bits.com This code is in the public domain… You can: copy it, use it, modify it, share it or just plain ignore it! Thx! The MFRC522 Library used, was created by LJOS here: https://github.com/ljos/MFRC522 The FastLED Library used, was created by focalintent here: https://github.com/FastLED/FastLED/releases */ #include […]

Details

Control Stepper Motor With Arduino

Featured Video Play Icon

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394#define IN1  8 #define IN2  9 #define IN3  10 #define IN4  11 int Steps = 4096; //4096 or 768 int cstep = 0; void setup() {   Serial.begin(9600);   pinMode(IN1, OUTPUT);   pinMode(IN2, OUTPUT);   pinMode(IN3, OUTPUT);   pinMode(IN4, OUTPUT); } void loop() {   for(int x=0;x<Steps;x++)   {   step1();   //delay(1);   delayMicroseconds(2500); […]

Details

Control a 4 Digit 8-Segment LED Display

Featured Video Play Icon

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262//code write by Moz for YouTube changel LogMaker360, 5-11-2016 //code belongs to this video, https://www.youtube.com/watch?v=256VQ6eVNng int digit1 = 6; //PWM Display most left display int digit2 = 9; //PWM Display second left int digit3 = 10; //PWM Display second right display int digit4 = 11; //PWM Display most right display #define DIGIT_ON  LOW #define DIGIT_OFF […]

Details

Arduino 2-axis Joystick and 8×8 LED

Featured Video Play Icon

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081#include <LedControl.h> int DIN = 12; int CS =  11; int CLK = 10; byte e[8]=     {0x7C,0x7C,0x60,0x7C,0x7C,0x60,0x7C,0x7C}; byte d[8]=     {0x78,0x7C,0x66,0x66,0x66,0x66,0x7C,0x78}; byte u[8]=     {0x66,0x66,0x66,0x66,0x66,0x66,0x7E,0x7E}; byte c[8]=     {0x7E,0x7E,0x60,0x60,0x60,0x60,0x7E,0x7E}; byte eight[8]= {0x7E,0x7E,0x66,0x7E,0x7E,0x66,0x7E,0x7E}; byte s[8]=     {0x7E,0x7C,0x60,0x7C,0x3E,0x06,0x3E,0x7E}; byte dot[8]=   {0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18}; byte o[8]=     {0x7E,0x7E,0x66,0x66,0x66,0x66,0x7E,0x7E}; byte m[8]=     […]

Details

Photoresistor (LDR) with LED

Featured Video Play Icon

1234567891011121314151617181920212223242526272829303132//set pin numbers //const won’t change const int ledPin = 13;   //the number of the LED pin const int ldrPin = A0;  //the number of the LDR pin void setup() {   Serial.begin(9600);   pinMode(ledPin, OUTPUT);  //initialize the LED pin as an output   pinMode(ldrPin, INPUT);   //initialize the LDR pin as an input […]

Details

Blinking 8 LEDs with Shift Register (74HC595)

Featured Video Play Icon

12345678910111213141516171819202122232425262728293031323334353637383940414243444546int DS_pin = 8; int STCP_pin = 9; int SHCP_pin = 10; void setup() {  pinMode(DS_pin,OUTPUT);  pinMode(STCP_pin,OUTPUT);  pinMode(SHCP_pin,OUTPUT);    writereg(); } boolean registers[8]; void writereg() {   digitalWrite(STCP_pin, LOW);     for (int i = 7; i>=0; i–)   {     digitalWrite(SHCP_pin, LOW);     digitalWrite(DS_pin, registers[i] );     digitalWrite(SHCP_pin, HIGH);   } […]

Details

Using Ultrasonic sensor HC-SR04

Featured Video Play Icon

123456789101112131415161718192021222324252627282930313233int echoPin = 10; int led = 7;     void setup() {   Serial.begin(9600);    pinMode(led, OUTPUT);    pinMode(trigPin, OUTPUT);   pinMode(echoPin, INPUT);   // put your setup code here, to run once:   }   void loop() {   long duration, distance;   digitalWrite(trigPin,HIGH);   delayMicroseconds(1000);   digitalWrite(trigPin, LOW);   duration=pulseIn(echoPin, HIGH);   […]

Details

How to read voltages with analogRead()

Featured Video Play Icon

In the last lesson you learned about using the analogRead() function to collect data from a sensor connected to one of the Arduino’ analog pins. The range of data we received from the analogRead() function, was mapped from 0 to 1023. What if we wanted to know the actual voltage being applied at the pin? […]

Details

Arduino IDE and Sketch Overview

Featured Video Play Icon

IDE stands for Integrated Development Environment. Pretty fancy sounding, and should make you feel smart anytime you use it. The IDE is a text editor like program that allows you to write computer code for your Arduino board. When you open up the Arduino program, you are opening the IDE. It is intentionally stream lined […]

Details