Skip to content

Instantly share code, notes, and snippets.

elktros / Digital_Voltmeter_using_8051_VoltageSensor_ADC0804.c
Created November 14, 2018 04:29
Code for Digital Voltmeter using 8051 Microcontroller, Voltage Sensor and ADC0804.
View Digital_Voltmeter_using_8051_VoltageSensor_ADC0804.c
#define lcd P3
#define dat P2
sbit rs=P1^6;
sbit e=P1^7;
void delay (int);
void display (unsigned char);
void cmd (unsigned char);
elktros / blinkingLED.asm
Last active November 2, 2023 14:01
8051 Microcontroller Assembly Language Program for Blinking LEDs
View blinkingLED.asm
ORG 00H ; Assembly Starts from 0000H.
; Main Program
START: MOV P1, #0XFF ; Move 11111111 to PORT1.
MOV A, P1 ; Move P1 value to ACC
CPL A ; Complement ACC
MOV P1, A ; Move ACC value to P1
WAIT: MOV R2, #10 ; Load Register R2 with 10 (0x0A)
elktros / ESP8266_WiFi_Controlled_Relay_Android.ino
Created April 4, 2018 10:40
Code for ESP8266 WiFi Module for Controlling a Relay over WiFi using Android App developed withe the help of MIT App Inventor 2.
View ESP8266_WiFi_Controlled_Relay_Android.ino
#include <ESP8266WiFi.h>
const char* ssid = "SSID";//type your ssid
const char* password = "PASSWORD";//type your password
int relayPin = 2; // GPIO2 of ESP8266
WiFiServer ESPserver(80);//Service Port
void setup()
elktros / Arduino_Radar_Processing_Code.pde
Created June 14, 2018 06:36
Processing Code for Arduino Radar Project.
View Arduino_Radar_Processing_Code.pde
import processing.serial.*;
import processing.opengl.*;
import toxi.geom.*;
import toxi.processing.*;
ToxiclibsSupport gfx;
Serial port;
String serialAngle;
elktros /
Created February 24, 2018 04:27
Python Script for Interfacing IR Sensor with Raspberry Pi. IR Proximity Sensor using Raspberry Pi.
import RPi.GPIO as GPIO
import time
sensor = 16
buzzer = 18
elktros / ESP8266_WiFi_Controlled_Robot.ino
Created April 21, 2018 05:37
Arduino Code for ESP8266 based WiFi Controlled Robot. This code works with the corresponding HTML code only.
View ESP8266_WiFi_Controlled_Robot.ino
#include <SoftwareSerial.h>
/* Pins 8, 9, 10 and 11 of Arduino are connected to L298N Motor Driver Input pins i.e.
IN1, IN2, In3 and IN4 respectively*/
#define IN1 8
#define IN2 9
#define IN3 10
#define IN4 11
#define DEBUG true
elktros / Arduino_Interrupts_Button_Interrupt_Debounce.ino
Created June 29, 2018 08:04
Interrupt based Button sketch with debounce for Arduino Interrupts Tutorial.
View Arduino_Interrupts_Button_Interrupt_Debounce.ino
int ledPin = 13;
int buttonPin = 2;
int ledToggle;
int previousState = HIGH;
unsigned int previousPress;
volatile int buttonFlag;
int buttonDebounce = 20;
void setup()
elktros / ESP32-Web-Controlled-Servo.ino
Created March 17, 2021 11:30
Code for ESP32 Web Controlled Servo.
View ESP32-Web-Controlled-Servo.ino
#include <WiFi.h>
const int servoPin = 16; /* GPIO16 */
const char* ssid = "ESP32-WiFi"; /* Add your router's SSID */
const char* password = "12345678"; /*Add the password */
int dutyCycle = 0;
//int position1 = 0;
View Transmitter Code without Library
#define dataout 12
#define ledPin 7
void setup()
pinMode(dataout, OUTPUT);
pinMode(ledPin, OUTPUT);
void loop()
View Receiver Code without Library
#define datain A0
#define ledPin 12
unsigned int temp = 0;
const unsigned int upperThreshold = 600;
const unsigned int lowerThreshold = 50;
void setup()
pinMode(ledPin, OUTPUT);