Hi guys, I am new to programming microcontrollers and i need help in coding for a smart parking system. I am looking for a code to enable the system to detect objects (vehicles) using 4 ultrasonic sensors (4 parking spaces), and have the Blynk mobile app show 4 LEDs that turn green when the sensor of each LED doesn't detect anything and turn red when it does. If anyone can help, i would greatly appreciate it.
Welcome to the forum
Do you want someone to write the code for you or do you already have some that you need help with ? If so then please post your sketch, using code tags when you do. This prevents parts of it being interpreted as HTML coding and makes it easier to copy for examination
In my experience the easiest way to tidy up the code and add the code tags is as follows
Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.
Hi, I have not written a code for it yet and was hoping someone with coding experience could help me write one.
You will get plenty of help here if you put in some effort, the emphasis being on help
What programming experience do do have and what Arduino examples have you looked at ?
I have little to no programming experience, and i have searched for some examples related to my project, i found one that was close but used infrared sensors instead of ultrasonic sensors.
I tried it and it seems that I also encountered the same problem.
You are taking on a complicated first project and I am afraid that you have no experience with Arduino to base it on so everything will seem difficult.
You will not find a sketch to do what you want and experience here with users who try to modify an existing sketch to do what they want shows that it is better to understand the principles before moving on
If you are feeling brave them try some of the Blynk examples even if they do not appear relevant to your project. You will learn about the structure of an Arduino sketch, the use of variables, interaction with devices attached to the Arduino and the use of Blynk
In my opinion it would be better for you to put aside the use of Blynk entirely until you are familiar with programming the Arduino even to do something as simple as blinking an LED them moving on to detect movement using a single sensor before pushing on towards your real goal
I am sorry to sound so negative but I have seen new users in this position before and it often does not end well
Did you choose this project or has it been given to you and do you have a date by which it must be finished ?
Ah, I see. It's alright, thank you for your time in replying to my post. And this project was suggested to me, I thought it wouldn't be too difficult, so i took it. Due date is by the end of the year.
You have plenty of time to get up to speed in that timescale, so start small, even as small as the examples in the IDE, and build towards your final project in steps
Welcome! I saw a very similar question here about a year ago. The picture was almost the same. If my memory is correct they used an Arduino UNO. What course is this for?