refrence/inspiration
Simple Arc drawing bot. Inspired by how technology can create art, not only by using software but also by making a robot create a hard copy of a picture/art piece.
Our project will be minimized to a machine that can only draw an arc with a specific length controlled by a keypad.
Arduino uno - 3*4 keypad - 180-degree servo - breadboard - male-male jumpers - USB cable
TD stick - cardboard - 2 zip ties - sellotape - scissors - cutter - marker - paper
Stage 1: research
1- search for the working concept of keypad.Â
(All rows are connected to/given a ground signal. All columns are connected to/given a 5V signal. Once a button is pressed, its row and column connect and the column will be read as ground.)
2- search for the wiring of the 4*4 keypad that is used in Tinkercad
Note: there is a difference in wiring between the 4*4 keypad in Tinkercad and the 3*4 keypad in our toolkit. (only C4 pinout will be neglected)
Stage 2: Tinkercad smart circuit wiring
Stage 3: Tinkercad smart circuit coding
1- construct a code for only one button of our keypad to check that the wiring and coding concept of keypad works properly.
2- construct the whole code that reads button 3 and button 6 to control the servo. we code that when button 3 or 6 is pressed, the servo moves 30 degrees and goes back to its original position or moves 60 degrees and goes back to its original position respectively. (Just for simplicity)
code part 1
code part 2
Stage 4: Converting code blocks to Arduino text code
Caution: to get the equivalent text code to our code blocks, we must choose (Blocks + Text) not (Text) from EDIT MODE. if we choose (Text) we won't be able to transfer back to our code bocks.
we copy all of the text code from Tinkercad and paste it to our Arduino IDE code window.
1- verify. to make sure our code has no errors.
2- choose our Arduino board. After connecting the board to the PC.
3- Upload. to upload our code to the Arduino board.
1- connect the electric circuit based on the Tinkercad circuit diagram.
Note: we can neglect the wiring of keypad pins that won't be used in our project.
Note: the connection can be minimized by removing the breadboard.
2- check that our hardware circuit does the required feature properly.
3- build an ecnlosure for the pen and connect it to our 180 Servo motor.
This code doesn't work with me. I think that is because when connecting to pin 3 that is set to HIGH with pin 9 that is connected to LOW, pin 3 will be set to LOW, not the opposite.
This code worked well.
Searching for the wiring and coding concept of each electronic component was the most important this that helped me in this assignment. Also, how to code using code blocks.
Play music using a buzzer controlled by Arduino
Title of Media