Skip to main content

LED Blinking With Arduino Nano

Newbie project with Arduino..


Code:


#define OUR_LED 12
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(OUR_LED, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(OUR_LED, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(OUR_LED, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

Comments

Popular posts from this blog

Arduino Interfacing With LCD(16x02) Without Potentiometer

All, today i gonna to share how Arduino connected to LCD(16x02). LCD 16x02 means 16 character in 2 rows. Connection between LCD and UNO Code: #include <LiquidCrystal.h> int Contrast=75;  LiquidCrystal lcd(12, 11, 5, 4, 3, 2);   void setup()  {     analogWrite(6,Contrast);      lcd.begin(16, 2);   }      void loop()  {      lcd.setCursor(0, 0);      lcd.print("ITS WORK");        lcd.setCursor(0, 1);      lcd.print("WELL DONE");  }

L298N motor with Ultrasonic Sensor using Can Bus MCP2515

Today, I will share the project where we use 2x Arduino where each Arduino act as Transmitter to measure a distance using Ultrasonic sensor and Receiver controlling L98N motor driver. Ultrasonic Sesnor L298N Motor Driver            Two output Motor Driver with Enable pin for both Motor. Requirement: 1. 2x Arduino 2. 2x MCP2515 CAN module 3. L298N Motor Driver 4. Ultrasonic Sensor 5. 12V battery 6. Download NewPing, SPI and mcp2515 into Arduino. Instruction: 1. Connect Arduino Nano to Ultrasonic sensor. 2. Connect Arduino Nano to MCP2515(1) through SPI connection. 3. Connect MCP2515(1) with MCP2515(2) using CAN-H and CAN-L wire. 4. Connect MCP2515(2) to Arduino Uno through SPI connection. 5. Connect Arduino Uno with Motor L298N. Code: Transmitter: #include <NewPing.h> #include <SPI.h>          //Library for using SPI Communication ...

Humidity_temperature (DHT11) using CAN MCP2515

Deep interesting in CAN BUS and working in this area encourage me to make a project using CAN BUS as a medium connection between two MCU. Today, i am gonna to share DHT11 temp sensor as a transmitter and give a output to serial monitor as Receiver using MCP2515. Interesting right?:) Code: Transmitter : #include <SPI.h>           //Library for using SPI Communication #include <mcp2515.h>        //Library for using CAN Communication #include <DHT.h>           //Library for using DHT sensor #define DHTPIN A0         //Define DHT 11 Pin Connected to Arduino #define DHTTYPE DHT11 //DEFINE DHTTYPE struct can_frame canMsg; MCP2515 mcp2515(10);       // Set the pin number where SPI CS is connected (10 by default) DHT dht(DHTPIN, DHTTYPE);      //initilize...