Pages: [1]   Go Down
Author Topic: a beginner's question...really needs help  (Read 590 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i have a project which is a lock system. it will open when a proper code has been entered on the keypad. it will also post a message on its own twitter account that the door has been opened... that is why we connected the arduino board to a pc to connect to the internet. what i want is to create a program (will be viewed in pc) that records all the time the door has been opened. how will i do that?

will i program the arduino to create such program with a nice interface
 [size=14]OR[/size]
i will create a separate application let's say coded in C# that will just get the data from the arduino (if this is the right one, how will that application get the data it will record from the arduino)
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you really are posting on twitter every time the door is opened, why do you also need to keep track on the PC when the door was opened?

If you are going to keep track on the PC when the door was opened, why do you need to twit about it?

Are you recording on the Arduino, too, when the door was opened? If not, it will do no good to ask the Arduino when the door was opened.

Seems to me like you have some duplicate data storage requirements that need to be sorted out before we can tell you how to do anything.

To sort of answer your questions, no you won't program the Arduino to create a program with a nice interface. The C# application can communicate with the serial port, which is a good thing because the Arduino can too.

However, opening a serial connection in the C# application will cause the Arduino to reset, as will closing the connection.

So, if the Arduino is to communicate with the PC, the connection must remain open at all times. So, there really was no reason to use an ethernet shield. The Arduino could have talked to the PC, and the PC could have twitted.

Is this a school project, by any chance?

How much of your project is currently working?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

twitter has limited history that is why i want to have a record also in the pc so i can see records dayssss ago, ..

the reason i used twitter is because i want to see the status of my system anywhere (twitter in cellphone)..

double data storage is good smiley-wink....

im not recording anything on the arduino but cant i just connect a pin to my lock system and if that pin experienced a current then that means the door opened so i can track when arduino opened the door...

and that is actually what i want to do: "The Arduino could have talked to the PC, and the PC could have twitted." and i want the PC to record when the door opened...

we do not want to use an ethernet shield, seems complicated and we have time and knowledge (we are all beginners) constraints....

please help me organize the process..we do not know where to start
« Last Edit: August 10, 2010, 06:20:44 am by eaon21 » Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
we do not want to use an ethernet shield, seems complicated and we have time and knowledge (we are all beginners) constraints....
I would still go with an ethernet shield.

Or you're going to be having a computer on all the time and probably a processing app which will be just as complex as using an ethernet shield.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
double data storage is good
Which one is right when they don't agree?

So, what part(s) of this project are working?

Yes, the Arduino knows when it opens the door, and could tell you that. But, unless you make it remember that it opened the door, it doesn't remember having opened the door. So, you can't ask it later to tell you all about when it opened the door.

As mowcius says, using an ethernet shield frees you from having the Arduino connected to the computer all the time. If you do go with the ethernet shield, you could make the Arduino talk to a server running PHP and MySQL. The PHP script could log, in the MySQL database, when the door was opened.

You could then write another PHP script to generate dynamic html so that you could see when the door was opened from any PC anywhere in the world.

If you can see Twit(ter) on your phone, you can see any other web-based application.

If you don't want to use the ethernet shield, and you are using a Linux-based OS, you could run PHP on the PC that the Arduino talks to, and store the "I opened the door" messages in a MySQL database on the PC or on a web server somewhere, instead.

If you are running windows, PHP can talk to the serial port, but not read from it. So, using PHP on windows is out. But, you could (at least I could) write a C++ or C# application that talked to the serial port and a web server or MySQL database.

Quote
we have time and knowledge (we are all beginners) constraints....
Knowledge constraints are meant to be overcome. What are the time constraints? If they are self-imposed, get over it. If they are externally imposed, like homework is due Friday, that's a problem. Better get humping.
Logged

Pages: [1]   Go Up
Jump to: