AGV
I want to build AGV as final project. SO I decide this week to start make wheels moves with bluetooth. To improve supplychain effieceny
Electrical component:
Adaptor
Jumper wires
Bread Board
DC Motor
L298N Motor driver
Bluetooth Module
Software:
Arduino IDE
Arduino Bluecontrol
Thinkercad
First, I prepared the components in Tinkercad:
I gathered an Arduino, a breadboard, 2 motor drivers, 4 DC Motors with 4 Wheels.
I used 9V to give motors enough power.
If you 12 V it is ok also.
I was work motors at the max speed by let the jumper on the speed pin.
and take outputs from digital pins.
I started by assembling the circuit on a breadboard, following the plan I created earlier. Since I had already tested the individual components, I proceeded with wiring everything together. I ensured that each sensor and output device was properly connected to the Arduino and powered correctly.
Note: I don't use resistors with bluetooth module due it willnot get any thing from laptop.
I connected the Bluetooth module VCC to 5V, GND to ground, and I connected the TX and RX bins to the Arduino.
Gear Motor is connected Through H-bridge, I wanted to be able to move the AGV.
Once the wiring was complete, I moved on to the coding part. I wrote an Arduino C script: The logic:
I used serial begin to establish serial communication to be able to give input through my phone and to get sensor readings.
if there is not serial comm. there will be nothing happening. I made sure to put it in if.
I establishg the power rails on the breadboard, connecting the 9V Adaptor to the positive rail and the GND to the negative. This allowed me to distribute power across all components. that need 9v.
I start by declare the pins for the motor driver
than I build a function for to be responsible about moving to make program easy when I want to develop it
I put inside this function all of moving cases I want.
Note: you can download the code and there is comments to explain on it.
Title of Media
The problem faced me I was Use at code
incomingdata = 1;
when I send One from mobile it is appear as 46
then I ask abdallarhman he tell me check you code or change bluetooth program
When I check the program
I figure out 46 is the ASCII code of 1
so I use it as char
incomingdata = '1';
Title of Media
Title of Media
Title of Media