arduino programing

dodos

Member
Join Date
Mar 2015
Location
africa
Posts
4
Hi,everybody.
Please anyone can help me to write the program for the following issue?

in fact i want to write the program to use for the car parking.

The input will be used for P1 barrier at the car park entrance .
And P2 input will be used for the barrier at the exit of the car parking.
Led1 must indicate when there are 5 cars in the parking.
Led2 must indicate when there is less than 5 in the parking.
Thanks in advance.
 
While there are certainly C++ and Arduino users here on this Forum, this is a very basic beginner level program and is more suited for an Arduino or basic C-language forum.

The first two things you will need to implement are an input debounce and an edge-transition counter, so that you can handle the sensor input conditions gracefully.

http://www.arduino.cc/en/Tutorial/Debounce

http://www.arduino.cc/en/Tutorial/ButtonStateChange

The counter and if-then-else and digital output operators are likewise in the first two chapters of any Arduino tutorial.

If you post your *.INO file with comments, Forum members would be happy to provide feedback. In general, we do not do school assignments on request without effort shown by the student.
 
for arduino there is a forum at www.arduino.cc as ken already showed you.
get yourself fritzing to make a diagram, and where you plan the I/O.
Then make a basic program and send it here.
i will give you one line
IF (CarCounter >= 5)
{digitalWrite(led1,HIGH)}
ELSE
{digitalWrite(led1,LOW)}
now you make same for led2
 

Similar Topics

I'm trying to write a data in Arduino using MODWR function block .I used the code I got from online for both PLC and Arduino. I made the wiring...
Replies
4
Views
90
I am working on a project that had originally started on a sparkfun redboard artemis. Through some testing I've pushed to utilize a PLC for the...
Replies
9
Views
1,588
Hello, I have been getting more and more requests for Real Time Clock (RTC) sensitive automation from my clients. I know that there is a Modbus...
Replies
13
Views
2,732
https://www.arduino.cc/pro/software-plc-ide Diving in when I get home. With its full IEC language support, object-oriented programming...
Replies
65
Views
19,679
https://www.hackster.io/news/arduino-unveils-the-opta-its-first-micro-plc-for-the-industrial-internet-of-things-d97f1d6b868a...
Replies
32
Views
10,132
Back
Top Bottom