Posted on behalf of students working on project for a school science fair.
---------------------
Project: Build an Obstacle- Detecting Walking Stick for Blind People (https://www.sciencebuddies.org/science- ... king-stick)
As we continue this project we have come across a few obstacles that we would like to get clearer directions on. The first thing we would like more clarification on is the coding part of this project. We were wondering why when we re-code with the video and the Arduino that you include with the project, why does the code not save? The second thing that was an obstacle for us is picking out the speaker that will be the best fit for this project.
Haley and Michelina
Obstacle-Detecting Walking Stick
Moderators: AmyCowen, kgudger, bfinio, MadelineB, Moderators
-
amyCC
- Site Admin
- Posts: 398
- Joined: Wed Apr 01, 2020 4:02 pm
- Occupation: Moderator
- Project Question: *
- Project Due Date: *
- Project Status: Not applicable
-
amyCC
- Site Admin
- Posts: 398
- Joined: Wed Apr 01, 2020 4:02 pm
- Occupation: Moderator
- Project Question: *
- Project Due Date: *
- Project Status: Not applicable
Re: Obstacle-Detecting Walking Stick
Hi Haley and Michelina - This is a fun project to work on!
I have provided this information to you already, but I want our Experts to see this so they don't have to make the same suggestions.
For the question about the Arduino code: Can you tell us more about what is happening? You have the code open in the Arduino IDE, and you aren't managing to send it to your Ardunio board. Is that correct? (Is that what you mean by it not "saving"?) One thing to check, first, is that the board is properly selected in the IDE. You have your board plugged into your computer, and you need to select it in the software.
In the Arduino IDE, check “Tools -> Port” and make sure the Arduino is listed with a COM port (on Windows; it will be something like “cu.usb” on Mac). If it isn’t showing up there, the Arduino is not being detected -- which means your program isn't going to be sent to the board.
The code you need is provided in the project. Download it under the "Test the Code" section.
You should download that, open it in the IDE, and upload it to your Arduino. You don't need to type the code in from scratch. The video is a supplement for the project, but you will want to also make sure you are using the written directions: https://www.sciencebuddies.org/science- ... king-stick
We also recommend watching the first three videos in the "How to Use Arduino" series before starting (if you haven't used Arduino before): https://www.sciencebuddies.org/science- ... an-arduino
The materials list has some information about the type of buzzer you need and links to another video from the How to Use Arduino series that you will want to watch: https://www.sciencebuddies.org/science- ... #materials
If you still have questions about the buzzer, let us know. Our Experts can provide some additional help with that.
Let me know if you are able to confirm that your Arduino is connected and selected in the IDE.
Amy
Science Buddies
I have provided this information to you already, but I want our Experts to see this so they don't have to make the same suggestions.
For the question about the Arduino code: Can you tell us more about what is happening? You have the code open in the Arduino IDE, and you aren't managing to send it to your Ardunio board. Is that correct? (Is that what you mean by it not "saving"?) One thing to check, first, is that the board is properly selected in the IDE. You have your board plugged into your computer, and you need to select it in the software.
In the Arduino IDE, check “Tools -> Port” and make sure the Arduino is listed with a COM port (on Windows; it will be something like “cu.usb” on Mac). If it isn’t showing up there, the Arduino is not being detected -- which means your program isn't going to be sent to the board.
The code you need is provided in the project. Download it under the "Test the Code" section.
You should download that, open it in the IDE, and upload it to your Arduino. You don't need to type the code in from scratch. The video is a supplement for the project, but you will want to also make sure you are using the written directions: https://www.sciencebuddies.org/science- ... king-stick
We also recommend watching the first three videos in the "How to Use Arduino" series before starting (if you haven't used Arduino before): https://www.sciencebuddies.org/science- ... an-arduino
The materials list has some information about the type of buzzer you need and links to another video from the How to Use Arduino series that you will want to watch: https://www.sciencebuddies.org/science- ... #materials
If you still have questions about the buzzer, let us know. Our Experts can provide some additional help with that.
Let me know if you are able to confirm that your Arduino is connected and selected in the IDE.
Amy
Science Buddies
-
lockmanh
- Posts: 5
- Joined: Mon Mar 31, 2025 8:52 am
- Occupation: Student
Re: Obstacle-Detecting Walking Stick
Hi Amy, what we mean by the code doesn't save we are basically saying that every time we plug in the breadboard to the computer it doesn't save. We would have to re-watch the video and re-code the project. The code did go to the breadboard, when we put our hands in front of it, it would tell us how many centimeters our hand was away from the sensor. This is really it thank you for answering us!
Haley and Michelina
Haley and Michelina
-
bfinio
- Expert
- Posts: 964
- Joined: Mon Aug 12, 2013 2:41 pm
- Occupation: Lead Staff Scientist, Science Buddies
- Project Question: Expert
- Project Due Date: n/a
- Project Status: Not applicable
Re: Obstacle-Detecting Walking Stick
Hi,
Chiming in here to clarify a potential point of confusion. If you downloaded and installed the desktop version of the Arduino software, you will need to manually save it by selecting File -> Save from the menu at the top. It will NOT auto-save like Google Docs or other cloud programs do. If you close and re-open the Arduino software without saving first, you will just get a blank window and need to re-enter the code. If you save it first, then next time you can select File -> Open and navigate to wherever you saved the code (it will be a file with a ".ino" extension) on your computer to open it again.
I'm not sure it that was the issue but wanted to mention it just in case.
Thanks,
Ben
Chiming in here to clarify a potential point of confusion. If you downloaded and installed the desktop version of the Arduino software, you will need to manually save it by selecting File -> Save from the menu at the top. It will NOT auto-save like Google Docs or other cloud programs do. If you close and re-open the Arduino software without saving first, you will just get a blank window and need to re-enter the code. If you save it first, then next time you can select File -> Open and navigate to wherever you saved the code (it will be a file with a ".ino" extension) on your computer to open it again.
I'm not sure it that was the issue but wanted to mention it just in case.
Thanks,
Ben
-
lockmanh
- Posts: 5
- Joined: Mon Mar 31, 2025 8:52 am
- Occupation: Student
Re: Obstacle-Detecting Walking Stick
Hi Ben,
This got us over half-way through our project! In the beginning of our project we ordered the kit and it has been so useful. The only thing that we are having trouble with now is getting the speaker coded in the Arduino. If you could send us some tips on how to get the speaker to connect to the code that would be amazing!
Haley and Michelina
This got us over half-way through our project! In the beginning of our project we ordered the kit and it has been so useful. The only thing that we are having trouble with now is getting the speaker coded in the Arduino. If you could send us some tips on how to get the speaker to connect to the code that would be amazing!
Haley and Michelina
-
bfinio
- Expert
- Posts: 964
- Joined: Mon Aug 12, 2013 2:41 pm
- Occupation: Lead Staff Scientist, Science Buddies
- Project Question: Expert
- Project Due Date: n/a
- Project Status: Not applicable
Re: Obstacle-Detecting Walking Stick
Hi Haley and Michelina,
In order to answer that question I will need some more details about what exactly you are doing right now. The example program you can download already contains the code for the buzzer.
1. Can you tell me whether you are using the exact example code downloaded from the Science Buddies procedure or if you wrote new code yourself?
2. If you wrote new code yourself, can you paste your code into a reply so I can look at it?
3. Can you upload a picture of your circuit (using the Attachments feature below when you reply to a post)? Make sure it is a good picture with a top view of the breadboard so I can see all the wires. That will help me tell if the buzzer is wired wrong.
4. Can you tell me where you bought your buzzer and provide a link? There are different types of buzzers and some might not work with this code.
Thanks,
Ben
In order to answer that question I will need some more details about what exactly you are doing right now. The example program you can download already contains the code for the buzzer.
1. Can you tell me whether you are using the exact example code downloaded from the Science Buddies procedure or if you wrote new code yourself?
2. If you wrote new code yourself, can you paste your code into a reply so I can look at it?
3. Can you upload a picture of your circuit (using the Attachments feature below when you reply to a post)? Make sure it is a good picture with a top view of the breadboard so I can see all the wires. That will help me tell if the buzzer is wired wrong.
4. Can you tell me where you bought your buzzer and provide a link? There are different types of buzzers and some might not work with this code.
Thanks,
Ben
-
lockmanh
- Posts: 5
- Joined: Mon Mar 31, 2025 8:52 am
- Occupation: Student
Re: Obstacle-Detecting Walking Stick
Hi Ben,
For the coding of the breadboard we used the video from the project here is the link below:
https://www.youtube.com/watch?v=n-gJ00GTsNg
For the wiring of the breadboard we used the picture in the instructions of the project.
As for the buzzer, we got it off of amazon from the link provided in the materials. The link is below:
https://www.amazon.com/dp/B07VK1GJ9X?re ... PDRPQ481C0
Here is the screenshots of our coding in the Arduino. It will not allow me to do more than two attachments so I will post another reply of just the breadboard pictures.
The last thing we are having trouble doing is coding the buzzer into the code on the Arduino. If you could send us some tips on how to code the buzzer to where it will beep when an obstacle is about 3 inches away that would be amazing!
Thank you so much for your time,
Haley and Michelina
For the coding of the breadboard we used the video from the project here is the link below:
https://www.youtube.com/watch?v=n-gJ00GTsNg
For the wiring of the breadboard we used the picture in the instructions of the project.
As for the buzzer, we got it off of amazon from the link provided in the materials. The link is below:
https://www.amazon.com/dp/B07VK1GJ9X?re ... PDRPQ481C0
Here is the screenshots of our coding in the Arduino. It will not allow me to do more than two attachments so I will post another reply of just the breadboard pictures.
The last thing we are having trouble doing is coding the buzzer into the code on the Arduino. If you could send us some tips on how to code the buzzer to where it will beep when an obstacle is about 3 inches away that would be amazing!
Thank you so much for your time,
Haley and Michelina
- Attachments
-
- Screenshot 2025-04-04 at 6.18.24 PM.png (488.72 KiB) Viewed 2435 times
-
- Screenshot 2025-04-04 at 6.18.12 PM.png (460 KiB) Viewed 2435 times
Last edited by lockmanh on Sat Apr 05, 2025 10:02 am, edited 1 time in total.
-
lockmanh
- Posts: 5
- Joined: Mon Mar 31, 2025 8:52 am
- Occupation: Student
Re: Obstacle-Detecting Walking Stick
Here are the pictures of our breadboard as well.
- Attachments
-
- Screenshot 2025-04-04 at 6.26.27 PM.png (1.07 MiB) Viewed 2432 times
-
- Screenshot 2025-04-04 at 6.25.56 PM.png (1.59 MiB) Viewed 2435 times
-
bfinio
- Expert
- Posts: 964
- Joined: Mon Aug 12, 2013 2:41 pm
- Occupation: Lead Staff Scientist, Science Buddies
- Project Question: Expert
- Project Due Date: n/a
- Project Status: Not applicable
Re: Obstacle-Detecting Walking Stick
Hello,
The tutorial video you followed for the code is only for the ultrasonic distance sensor. We have a separate video about buzzers here:
https://youtu.be/gj-H_agfd6U?si=ZHhO9VMXkgE6vUP6
I will add that video to the project as well since it wasn't there.
Also, if you go to the "Test Your Code" section in the Procedure of the project, you can download an example code file that includes code for the buzzer, and that should have what you need: https://www.sciencebuddies.org/science- ... #procedure.
I hope that helps, please let me know if you have more questions.
The tutorial video you followed for the code is only for the ultrasonic distance sensor. We have a separate video about buzzers here:
https://youtu.be/gj-H_agfd6U?si=ZHhO9VMXkgE6vUP6
I will add that video to the project as well since it wasn't there.
Also, if you go to the "Test Your Code" section in the Procedure of the project, you can download an example code file that includes code for the buzzer, and that should have what you need: https://www.sciencebuddies.org/science- ... #procedure.
I hope that helps, please let me know if you have more questions.
-
lockmanh
- Posts: 5
- Joined: Mon Mar 31, 2025 8:52 am
- Occupation: Student
Re: Obstacle-Detecting Walking Stick
Hi Ben,
We finished almost the whole project at this point, the only thing that we would like to change is the distance of when the buzzer starts beeping. We would like to re-code the code and make the beeping distance longer, we would like the buzzer to beep at 18 inches.
If you could send us where to fix the code so that way the buzzer starts beeping at a longer distance that would be amazing!
Thank you so much for your time and help,
Haley and Michelina
We finished almost the whole project at this point, the only thing that we would like to change is the distance of when the buzzer starts beeping. We would like to re-code the code and make the beeping distance longer, we would like the buzzer to beep at 18 inches.
If you could send us where to fix the code so that way the buzzer starts beeping at a longer distance that would be amazing!
Thank you so much for your time and help,
Haley and Michelina
-
amyCC
- Site Admin
- Posts: 398
- Joined: Wed Apr 01, 2020 4:02 pm
- Occupation: Moderator
- Project Question: *
- Project Due Date: *
- Project Status: Not applicable
Re: Obstacle-Detecting Walking Stick
Hi Haley and Michelina - (Ben may not be able to reply today.)
To change the distance at which it starts beeping, you'll want to change the threshold variable value in the code. The threshold is a distance in centimeters.
This is explained in the video. It's just a few seconds after this point: https://www.youtube.com/watch?v=7hmTb7Iqm4s&t=220s (3:54)
So if you want 18 inches, you'll need to convert 18 inches to centimeters (multiply by 2.54), change the threshold value in the code, save, and re-upload.
Let us know if you have questions.
Amy
Science Buddies
To change the distance at which it starts beeping, you'll want to change the threshold variable value in the code. The threshold is a distance in centimeters.
This is explained in the video. It's just a few seconds after this point: https://www.youtube.com/watch?v=7hmTb7Iqm4s&t=220s (3:54)
So if you want 18 inches, you'll need to convert 18 inches to centimeters (multiply by 2.54), change the threshold value in the code, save, and re-upload.
Let us know if you have questions.
Amy
Science Buddies

