Hi,
I like to share my experience connecting Raspberry Pi 3 B+ , Arduino Uno , Active Buzzer ( KY-012) / Passive Buzzer ( KY-006)
I.Things Needed :
1. Raspberry Pi 3 Model B+
2. Arduino Board
3. Solderless board
5. Active Buzzer ( KY-012)
or Passive Buzzer ( KY 006)
6. USB A to USB B Connector ( to connect Raspberry Pi 3 B+ with Arduino )
or Passive Buzzer ( KY 006)
6. USB A to USB B Connector ( to connect Raspberry Pi 3 B+ with Arduino )
II. Install necessary packages :
a) Install Arduino IDE in Raspberry Pi 3 B+ with :
sudo apt-get install arduino
You will be seeing board light blinking in Arduino board.
III. Circuit Completion
Complete the circuit has shown below :
Arduino Pin connection
Buzzer S
Pin ( Signal) : to Arduino :
Pin 8
Buzzer –ve Pin : to Arduino Ground Pin
IV. Tone Melody program
a) Go to Arduino IDE, Choose the type of Arduino board : go to Tools > Board > Arduino Uno.
b) Select the port the Arduino is connected to, look under Serial Port under the Tools menu ( serial port in the raspberry Pi will be like /dev/ttyACM0).
b) Select the port the Arduino is connected to, look under Serial Port under the Tools menu ( serial port in the raspberry Pi will be like /dev/ttyACM0).
d) Ensure the pin number in the Program is Pin 8 in the function tone() :
tone(8
e) Compile the tone Melody program by clicking the tick button( left most button in IDE )
f) Click the upload button to upload the blink program.
IV. Executing the blink programtone(8
e) Compile the tone Melody program by clicking the tick button( left most button in IDE )
f) Click the upload button to upload the blink program.
a) Output will appear as shown below :
b) Now disconnect USB cable connecting Raspberry Pi , Arduino.
Now connect the USB cable to any Mobile USB charger. Press the Reset button in Arduino. You will get the buzzer playing the tone.
Now , you have successfully connected Raspberry Pi , Arduino and Active / Passive Buzzer.
Kindly share your comments to improve my posting.
No comments:
Post a Comment