Pages: 1 ... 5 6 [7]   Go Down
Author Topic: Automated Reptile Control System(webserver, Data Logging, RTC and much more)  (Read 31009 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great project. I have my own version of this that I created to monitor/control my coastal carpet python enclosure. If anyone is thinking or recreating your work I just wanted to throw a few ideas in the mix for people to play with. I am in the middle of a redesign where I will be off loading the heavy lifting of the web page and all decision making to a raspberry pi. So basically you write the web page and serve it from the pi. You have a program running on the pi that communicates with the arduino over i2c. The pi program reads its settings from a mysql database and requests sensor readings and ask the arduino to open or close relays storing any data collected and state changes in the database. The web page then displays sensor readings it reads from the mysql database and updates the pi program settings via the database.

The advantage, as I see it, to this approach is that you can use a cheaper arduino or even an attiny85 depending on how inputs you need. Your raspberry pi can easily have additional storage attached and can even control multiple arduinos. I wrote my code such that my pi can ask for individual bytes of data over I2C. That way it can verify that its getting good data from the sensor via the arduino. I like this approach as it makes it very easy for me to add sensors to an arduino and to add arduinos to the I2C bus. Right now I have one arduino for my carpet's enclosure and one to read switches from my houses ADT security system (registers doors opening and closing, motion detection, and garage door state).
Logged

Sydney, Australia
Offline Offline
Sr. Member
****
Karma: 6
Posts: 397
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great project. I have my own version of this that I created to monitor/control my coastal carpet python enclosure. If anyone is thinking or recreating your work I just wanted to throw a few ideas in the mix for people to play with. I am in the middle of a redesign where I will be off loading the heavy lifting of the web page and all decision making to a raspberry pi. So basically you write the web page and serve it from the pi. You have a program running on the pi that communicates with the arduino over i2c. The pi program reads its settings from a mysql database and requests sensor readings and ask the arduino to open or close relays storing any data collected and state changes in the database. The web page then displays sensor readings it reads from the mysql database and updates the pi program settings via the database.

The advantage, as I see it, to this approach is that you can use a cheaper arduino or even an attiny85 depending on how inputs you need. Your raspberry pi can easily have additional storage attached and can even control multiple arduinos. I wrote my code such that my pi can ask for individual bytes of data over I2C. That way it can verify that its getting good data from the sensor via the arduino. I like this approach as it makes it very easy for me to add sensors to an arduino and to add arduinos to the I2C bus. Right now I have one arduino for my carpet's enclosure and one to read switches from my houses ADT security system (registers doors opening and closing, motion detection, and garage door state).

I would love to see this code if at all possible please ? Particularly the interaction over i2c between the Arduino and the Pi.

I have a home automation project that i am migrating from a picaxe to the Arduino environment and am using i2c to pass values between the  Arduino and the picaxe. The logical extension of this would be move to the Rpi for the web serving etc.

Craig
Logged

Offline Offline
Full Member
***
Karma: 4
Posts: 107
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes, please post your code or perhaps post a link to thread you have for your project?  smiley-grin
Logged

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

hi,
I'd appreciate getting your code as well.thanks!
Logged

Offline Offline
God Member
*****
Karma: 32
Posts: 828
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am in the middle of a redesign where I will be off loading the heavy lifting of the web page and all decision making to a raspberry pi. So basically you write the web page and serve it from the pi. You have a program running on the pi that communicates with the arduino over i2c.

I've got a write-up of a demo project with example code that does a similar thing distributing the "heavy lifting" part of the web-serving to a Pi, except the Arduinos connect to the Pi via a wireless link using nRF24L01+ radios instead of a wired link.

The demo project was actually inspired by wallaceb's reptile program, and although the demo application doesn't control a vivarium, the web page design will immediately trigger recognition! (Thanks again wallaceb! :-)

Anyway, here's the link to the project pages: http://embeddedcoolness.com/rfxduino-demo-projects/

Note that you can't really compile and run the code in the later stages of the sketch development without the RFXduino gateway system, but even without it the general design principles and structure of the program may be of interest.
Logged

WiFi shields/Yun too expensive? Embeddedcoolness.com is now selling the RFXduino nRF24L01+ <-> TCP/IP Linux gateway: Simpler, more affordable, and even more powerful wireless Internet connectivity for *all* your Arduino projects! (nRF24L01+ shield and dev board kits available too.)

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

Hi,
Really it's great project. I'm not expert in arduino. I saw this post before and this gave me idea to do something similar at home. so, i bought a an Arduino mega 2560 with ethernet shield to test this code. I got the boards this morning. I downloaded Arduino IDE 1.0.5 and your code. but when compiling, i got some errors :
Code:
I:\Users\drupalmavie\Documents\Arduino\libraries\EthernetDNS\EthernetDNS.cpp:25:23: error: wiring.h: No such file or directory
I:\Users\drupalmavie\Documents\Arduino\libraries\EthernetDNS\EthernetDNS.cpp: In member function 'DNSError_t EthernetDNSClass::_sendDNSQueryPacket(const char*)':
I:\Users\drupalmavie\Documents\Arduino\libraries\EthernetDNS\EthernetDNS.cpp:247: error: 'millis' was not declared in this scope
I:\Users\drupalmavie\Documents\Arduino\libraries\EthernetDNS\EthernetDNS.cpp: In member function 'DNSError_t EthernetDNSClass::pollDNSReply(byte*)':
I:\Users\drupalmavie\Documents\Arduino\libraries\EthernetDNS\EthernetDNS.cpp:375: error: 'millis' was not declared in this scope
I:\Users\drupalmavie\Documents\Arduino\libraries\EthernetDNS\EthernetDNS.cpp: In member function 'DNSError_t EthernetDNSClass::resolveHostName(const char*, byte*)':
I:\Users\drupalmavie\Documents\Arduino\libraries\EthernetDNS\EthernetDNS.cpp:402: error: 'delay' was not declared in this scope

As you can see, it's related to wiring.h (this file i can't find it in arduinos core folders) ans i have no idea. how can i solve this?

Logged

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

Hi,
I resolved the error. it was an outdate library that I used. now, I tested the project and i have to congratulate you for this work.
Good job Man and many thanks for the sharing.
I will learn a lot from this.
Logged

Offline Offline
Full Member
***
Karma: 4
Posts: 107
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I resolved the error. it was an outdate library that I used. now, I tested the project and i have to congratulate you for this work.
Good job Man and many thanks for the sharing.
I will learn a lot from this.


i am glad to hear you resolved the issue on your own. and i also want to thank you for your compliments.
Logged

Pages: 1 ... 5 6 [7]   Go Up
Jump to: