Posts

Showing posts from April, 2024

Smart Elevator simulation with arduino uno and Proteus

Image
Smart Elevator simulation with arduino uno and Proteus  // By HomeMade Electronics // Subscribe to my channel https://www.youtube.com/channel/UC8isJR_71x1wIfw6jB106pg // for more tutorial videos // like, share and leave a comment if you need help #include "HX711.h"  // Get this library by clicking on Sketch > Include Library > Library Manager in the Arduino IDE and install it from there #include <LiquidCrystal.h> // Define calibration factor obtained using the SparkFun_HX711_Calibration sketch #define calibration_factor 18029.57  // Define pin numbers #define IN1 4 #define IN2 5 #define DOUT  3 #define CLK  2 #define Bstart 6 #define Bstop 7 #define Bstopage 1 float weight; // Variable to store weight measurement HX711 scale; LiquidCrystal lcd(13, 12, 11, 10, 9, 8); // Function to move motor forward void forward() {   digitalWrite(IN1, HIGH);   digitalWrite(IN2, LOW); } // Function to move motor backward void backward() {   digitalWrite(IN1, LOW);   digitalWrite(

Traffiic lights with LCD and LEDS using ATMEGA32 with PROTEUS

Image
Main code: #include <avr/io.h> #include "LCD.h" #include "timer.h" #define F_CPU 8000000UL #include <util/delay.h> #include "LED.h" #include <avr/interrupt.h> volatile unsigned char counter1=0; volatile unsigned char counter_green=10; volatile unsigned char counter_yellow=5; volatile unsigned char counter_red=7; int main(void) { LED_vInit('D',0); LED_vInit('D',1); LED_vInit('D',2); LCD_vInit(); timer_CTC_init_interrupt();     while(1)     { counter_green=10; counter_yellow=5; counter_red=7; LCD_clearscreen(); LCD_vSend_string("remaining 10 sec"); LED_vTurnOn('D',0); while(counter_green>0) { if(counter1>=100) { counter1=0; counter_green--; LCD_movecursor(1,11); LCD_vSend_char(' '); LCD_vSend_char((counter_green%10)+48); } } _delay_ms(500); LED_vTurnOn('D',1); LED_vTurnOff('D',0);

ARDUINO calculator in PROTEUS.

Image
 #include <LiquidCrystal.h> #include <Keypad.h>  const byte ROWS = 4; // Number of rows in the keypad matrix const byte COLS = 4; // Number of columns in the keypad matrix // Define the Keymap for the keypad char keys[ROWS][COLS] = {   {'7', '8', '9', 'D'},   {'4', '5', '6', 'C'},   {'1', '2', '3', 'B'},   {'*', '0', '#', 'A'} }; byte rowPins[ROWS] = {A0, A1, A2, A3}; // Pins connected to the keypad rows byte colPins[COLS] = {10, 9, 8, 7};     // Pins connected to the keypad columns Keypad kpd = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS); // Initialize the keypad object LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // Initialize the LCD object with pins long Num1, Num2, Number; // Variables to store numbers and result of calculations char key, action;         // Variable to store the pressed key and the arithmetic operation boolean result =

Top 4 easy to make ESP32 projects for IOT applications.

Image
  Top 4 easy to make ESP32 projects . These codes were takenform https://wokwi.com/ ESP32 WIFI SCANNER /* ESP32 WiFi Scanning example This code demonstrates how to scan for available WiFi networks using an ESP32 module. */ #include " WiFi.h " void setup () {   Serial . begin ( 115200 ); // Initialize serial communication at 115200 baud rate   Serial . println ( "Initializing WiFi..." ); // Print a message indicating WiFi initialization   WiFi.mode(WIFI_STA); // Set WiFi mode to station (client) mode   Serial . println ( "Setup done!" ); // Print a message indicating setup completion } void loop () {   Serial . println ( "Scanning..." ); // Print a message indicating the start of WiFi scanning   // WiFi.scanNetworks will return the number of networks found   int n = WiFi.scanNetworks(); // Scan for available WiFi networks and store the number of networks found   Serial . println ( "Scan done!" ); // Print a message indicating