First, I’m very sorry if this is covered in another post. I’m new here, and have read quite a few posts, but can’t possibly read them all.
I have a project that I’ve been wanting to do (mostly for fun). Right now I have a Fez Panda and a Thermometer in my shopping cart. I want to design something that measures the temperature of the room, and if that temperature get’s to high I have the device programmed to send off a message, preferably I’d like it saved to a SQL Database on a remote server. Also, let’s say I have 2-3 of these, how would I know which device sent the message (which room overheated). Is this something that I could program into each device, or is there some sort of unique identifier for the device so I wouldn’t have to change the code for each one? See, I said I was new at this : ).
So, can I do this with the Panda and Temperature sensor? Is there anything else that I would need? How is the Panda powered?
Another way of doing this might be to use Xbee and have a temperature sensor attached to it and transmitting at regular intervals. Maybe something like this Wireless Temperature Sensor | Project Lab Then you could have your Panda monitoring the values and transmitting them to the database.
I would stick with Geir’s plan.
It would be best to transmit data and then commit it in the database. You could design a table like this:
TEMPERATURE
log_id
dev_id
temperature
temp_time
Where:
log_id (primairy key - auto numbering)
dev_id (device ID, for multiple devices)
temperature (speaks for itself)
temp_time (dateTime of temperature)
You can have multiple pandas, which send their data. Including with the data they send a device ID (or name?).
You can then design a small piece of software which lets you manage your database. You can read out your temperature warnings, delete them, whatever you want
To assign a unique ID to each device you could compile the ID into the program, which would require a separate compile and deploy for each device, or you could use a couple of detail ports as inputs and wire the ID.
Each 1-wire device has a unique 64-Bit Serial Code Stored in an On-Board ROM which you could use as your device ID. That way you only need a single compile and deploy plus don’t need to do any hardware settings.
Then you would also need an Ethernet shield, or will there be a PC between the Panda and the network? Also, I don’t think SQL is supported straight on the Panda…