The important & standard post format
Controlling Led Brightness With an Arduino Uno Board
The video is project given below
Welcome friends to a world of robots. Let’s start with a simple project of controlling a led’s brightness
Materials:
Led
Resistor 330 ohm
Rotary Potentiometer
Male/Male Jumper Wires
Breadboard
Arduino Uno
Software:
Arduino IDE
Step 1: Connections
Now let’s talk about the connections of the Led, Resistor, and the Potentiometer with the Arduino
Please follow the circuit diagram given.
Connections are:
Potentiometer T1 to Arduino pin 5v
Potentiometer T2 to Arduino pin GND
Potentiometer Out to Arduino pin A0
Led + to 13
Led – to GND
Step 2 : Code
As we are familiar with the connections , let’s upload the code.
For the code visit : https://github.com/Aiversity/Arduino-Projects-for-Kids/tree/master/Control%20LED%20Brightness
Step 3 : Testing
Now let’s test the code.
1. Open the downloaded sketch.
2. Connect the arduino to your device.
3.Click tools and select the board and the port no. In our case, the board is Arduino-Genuino Uno
4.First compile the program and then upload it.
5.After Uploading the code, rotate the potentionmeter knob and play with your first arduino project.
For any queries, email me at hello.aiversity@gmail.com
Controlling Traffic Lights With Arduino Uno
Welcome to our project of building automatically controlled traffic lights.
Materials:
Red LED x 1
Yellow LED x 1
Green LED x 1
220Ω resistor x 3
Arduino-Genuino Uno x 1
Breadboard x 1
Male to Male jumper wires x 4
Explanation of Materials:
Resistor:
A resistor is used to decrease the current power for the led. There are many types of resistors. We differentiate by their color codes. The diagram given on the right is just given for your reference.
Led
As shown in the image on the left
The long terminal which is the anode is the positive terminal of the led.
The short terminal which is the cathode is the negative terminal of the led.
Arduino-Genuino Uno
The parts of the Arduino Uno are given.
The pins at the right of the board from 13 to 2 are output and input pins.
The 1 and 0 pins are the TX and RX pins
The lower pins on the left are analog input pins
The upper left pins are the 5v, GND and other pins.
BreadBoard:
The solderless breadboard is ideal for testing projects.The diagram is given:
At the bottom of the breadboard, the sides of the breadboard are connected together There are 1 positive and 1 negative rails on each side.
In the between each row has 5 pins connected.
For the explanation video, see:
In this video I have shown the function of the parts i have used in this project.
Connections:
Now we know the function of each part, let’s talk about the connections:
The connection diagram is given or download it:
Pin 8 is of Arduino connected to the red led’s positive
Pin 10 of Arduino is connected to the yellow led’s positive
Pin 12 of arduino is connected to the green led’s positive
GND of arduino is connected to the negative rail of the breadboard
All the negative pins of led are connected to the negative rail of the breadboard.
Connection Explanaton Video:
In this video I have explained how the connections work in project
#define Red_pin 8
#define Yellow_pin 10
#define Green_pin 12
The #define function defines the
‘1 parameter’ Red_pin as the ‘2 parameter’ 8.
We can’t change the no. by adding as it is a constant.
void setup() {
// initialize digital pin 13 as an output.
pinMode(Red_pin, OUTPUT);
pinMode(Yellow_pin, OUTPUT);
pinMode(Green_pin, OUTPUT);
}
The void setup function runs the code only once.
The pinMode(Red_pin, OUTPUT) inside the void setup function defines the pin no. which is the first parameter, and the function that is the output which is the second parameter.
void loop() {
digitalWrite(Red_pin, HIGH);
delay(3000);
digitalWrite(Yellow_pin, HIGH);
delay(1000);
digitalWrite(Red_pin, LOW);
digitalWrite(Yellow_pin, LOW);
digitalWrite(Green_pin, HIGH);
delay(3000);
The void loop function runs the program forever. We have to upload another program to stop it. The digitalWrite function switches off and on the given pin no. In digitalWrite(Red_pin, HIGH); the 1st parameter is the pin no we want to output to and the 2nd parameter is the state of the pin. HIGH/1 is on and LOW/0 is off. The delay function stops the program for the given milliseconds.
Code Explanation Video:
Testing:
Now we have understood the code and the connections and code, so let’s test our project
1.Upload the code
2.See the arduino uno board for the results
For any queries or comments, please email me at hello.aiversity@gmail.com.
Water Level Monitor Using Raspberry Pi
Hello everybody, I am Shafin, a member of Aiversity. I am going to share how to build a water level sensor with an Oled display for water tanks with a Raspberry pi. The OLED display will show the percentage of the bucket filled with water.
Materials:
- Raspberry Pi Model 3B
- Ultrasonic Sensor
- Oled Display (4 pins)
- Jumper Wires
- Buzzer
Raspberry Pi 3 Model B
Raspberry Pi is a credit card-sized programmable computer that fits in your pocket. In this project, I am using a Raspberry Pi model 3B. It has 40 Gpio pins, 4 USB ports, charging and an HDMI port with an Ethernet port. It is compatible with almost all projects.


Ultrasonic Sensor:
Ultrasonic Sensor is a sensor that can measure the distance between the sensor and the object using echolocation i.e the principle which bats use.
Buzzer:
A buzzer is a small component that gives out a sound wave when is switched on. We are going to use this to alert if our water tank is full
In addition to these, we will need a bucket and a jug

Oled Display:
OLED Display is a component that can display images and words clearly. I have used a 128 x 64 display.
In addition to this, we need:
A bucket
A water jug
Connections:
Ultrasonic sensor VCC to 5v of Raspberry Pi
Ultrasonic sensor Gnd to Gnd of Raspberry Pi
Trigger to GPIO 2
Echo to GPIO 3
Buzzer + to GPIO 4
Buzzer – to Gnd


Structure:
Structure
· Attach a scale to the bucket.
· Next attach the buzzer and ultrasonic sensor to the scale
Code:
Now you know the connections and the structure, let’s build the code.
1. Open the Thonny Python IDE
2. Download the Github code below or from the end of the page:
. Run the code
You will have to add your distance from the ultrasonic sensor to the base of the bucket on the line :
Line 25. dist_from_base = #Write the distance from the sensor to the base of the bucket
Testing
Fill water in the bucket. When the distance of the ultrasonic sensor from the water is around 4 centimeters, the buzzer will beep, alerting the bucket is almost full.
If you have any queries, please ask at hello.aiversity@gmail.com
To know more, visit Aiversity.com
Installation Of ServoRPi
Install By Github(Linux):
-
Step 1: First Download The Library By Command Line:

-
Step 2: Then Go In The Folder And Setup The Library:

Install By Pip:
Just Type This In Your Terminal And Press Enter :
Now You Can See This Link For Usage Of The Library Here: http://aiversity.com/usage-of-servorpi/
Usage Of ServoRPi
How To Use The ServoRPi Library.
First, we should import the ServoRPi.servo library. We should also import the RPi.GPIO as you will need it to control the servo.
- import ServoRPi.servo as servo
- import RPi.GPIO as GPIO
Next, we will set up the output pin type (.BOARD or .BCM). In our case, it is .BOARD
- GPIO.setmode(GPIO.BOARD)
Now, we will set up the pin as an output
- GPIO.setup(11, GPIO.OUT)
We will now give the pin as the PWM pin and name it servo1, pin no. as 11, and frequency as 50 hertz (most servos are 50 hertz)
- servo1 = GPIO.PWM(11, 50)
Now let’s start the servo and instead of the number, we will write the function servo.startposition(<angle>) where <angle> will be the angle from 0 to 180. So the line will be servo1.start(servo.startposition(x))
- servo1.start(startposition(0))
Then we will now change the direction of the servo by we will write the line servo1.ChangeDutyCycle() where the is the function – servo1.write() and where is the angle you want to output. So the whole line is now –
- servo1.ChangeDutyCycle(servo1.write(<angle>))
So now the whole code is,
- import ServoRPi.servo as servo
- import RPi.GPIO as GPIO
- GPIO.setmode(GPIO.BOARD)
- GPIO.setup(11, GPIO.OUT)
- servo1 = GPIO.PWM(11, 50)
- servo1.start(startposition(0))
- servo1.ChangeDutyCycle(servo1.write())
Water Level Monitor With Oled Display Using Raspberry Pi
Hello everybody, I am Shafin, a member of Aiversity. I am going to share how to build a water level sensor with an Oled display for water tanks with a Raspberry pi. The OLED display will show the percentage of the bucket filled with water.
Materials:
- Raspberry Pi Model 3B
- Ultrasonic Sensor
- Oled Display (4 pins)
- Jumper Wires
- Buzzer
|


Ultrasonic Sensor:
Ultrasonic Sensor is a sensor that can measure the distance between the sensor and the object using echolocation i.e the principle which bats use.
Buzzer:
A buzzer is a small component that gives out a sound wave when is switched on. We are going to use this to alert if our water tank is full
In addition to these, we will need a bucket and a jug

Oled Display:
OLED Display is a component that can display images and words clearly. I have used a 128 x 64 display.
In addition to this, we need:
A bucket
A water jug
Connections:
Ultrasonic sensor VCC to 5v of Raspberry Pi
Ultrasonic sensor Gnd to Gnd of Raspberry Pi
Trigger to GPIO 2
Echo to GPIO 3
Buzzer + to GPIO 4
Buzzer – to Gnd


Structure:
Structure
· Attach a scale to the bucket.
· Next attach the buzzer and ultrasonic sensor to the scale
Code:
Now you know the connections and the structure, let’s build the code.
1. Open the Thonny Python IDE
2. Download the Github code below or from the end of the page:
. Run the code
You will have to add your distance from the ultrasonic sensor to the base of the bucket on the line :
Line 25. dist_from_base = #Write the distance from the sensor to the base of the bucket
Testing
Fill water in the bucket. When the distance of the ultrasonic sensor from the water is around 4 centimeters, the buzzer will beep, alerting the bucket is almost full.
If you have any queries, please ask at hello.aiversity@gmail.com
To know more, visit Aiversity.com