Pages: [1]   Go Down
Author Topic: Car Park with Arduino Uno  (Read 862 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone

I ask you for a little help with a school project that I am doing and I am using an Arduino Uno. The project is a car park for 8 spaces with a free indicator park and park complete with an inlet and an outlet (using servos) and if possible a 7-segment display (which indicate the number of vacancies in park). My idea was that if a car was to enter the park opened the barrier for 5 seconds and after that time the barrier closes and this car is added to the count and exit when a car is about to leave the barrier opens and closes after 5 seconds a car and is taken to the count. When the park is full, the red light comes on and as soon as a car leaves the red light turns off and turns on the green light.

Will can give me a little help?
Logged

London
Offline Offline
Edison Member
*
Karma: 46
Posts: 1368
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Help with what? The electronics, the code or the idea?
If this is to be a real carpark entry system and your barrier comes down after 5 seconds it will probably damage every car that enters and leaves! What you need to do is to detect when the car has left the area of the barrier before you let the barrier come down.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The park is just like a model. And just need help with the program the Arduino.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When I'm going to upload the program to the Arduino it gives me some errors in variables. Will could give me a hand with the program?
Logged

SG
Offline Offline
Sr. Member
****
Karma: 11
Posts: 495
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When I'm going to upload the program to the Arduino it gives me some errors in variables. Will could give me a hand with the program?
Show us your code, use "#" to insert code.
What error message?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The code is:

* Parque_de_Estacionamento.ino (2.61 KB - downloaded 21 times.)
Logged

Copenhagen, Denmark
Offline Offline
Edison Member
*
Karma: 32
Posts: 1200
Have you testrun your INO file today?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, I took the trouble to download your code, then put in my IDE andhit the compile button to get your error messages. Life would be easier if you did those things --> http://arduino.cc/forum/index.php/topic,148850.0.html see the end of section 7.

Your problem is
Code:
const int One = 3 , 4;
and lines like that.
How can one constant (or variable for that matter) hold several values? It can not. From your program I can not guess what you meant by that.
Code:
if(COUNTER<1Car)
is flagged as invalid suffix "Car" on integer constant
Your problem is that you can not combine a number "1" with "Car" like that. I can not guess if you meant 1+Car or a variable named "one_car".

First make some little program that turns LED 1 on if you hit the "add car" and off when you hit the "subtract car". I think that will help you understand some basic syntax of C. After that we can look into the flow of your program logic.
Logged

Pages: [1]   Go Up
Jump to: