Instructables

A Remotely Programable Relay Controller (Christmas Lights or Home Automation Controller)

Featured

Step 4: The Software


Here is the .pde sketch file.

Just download this sketch and load it into your AtMega328 chip and you are off and running!

The code has almost exhausted the RAM capacity of the ATMega328 - if you decide to make any changes, you will need to be very careful not to let the buffers corrupt the stack space.

All of the code is commented - and should be able to be followed.


 
Remove these adsRemove these ads by Signing Up
xp_sm1 month ago

Please help me

I have this error like below when compiling the code:

Error: D:\cvavr2\inc\pgmspace.h(90), included from: ip_arp_udp_tcp.h: incomplete type is not allowed ---<ypedef void prog_void PROGMEM;>

avr.png
axe5122 years ago
Please help me, where can I find: etherShield.h ?

I have this error like below when compiling the code:

Ethernet_Relay_Controller.pde

error: 'Time' does not name a type In function 'void do_zone_selection_ACT_GOVT()':
In function 'void setup()':
In function 'void loop()':
In function 'uint16_t print_time_page(uint8_t*)':

Please advise.

Thanks!
sv1elf2 years ago
Hi
I have a New Arduino Uno - R3 board .
Can i program with this board the atmega IC?
Is it possible to add a port like ' 7000 ' in case i want forward the ip- port to router?
Thanks
George
drj113 (author)  sv1elf2 years ago
The UNO should be able to program an Atmega328 for you - as long as your UNO has the Atmega chip socketed.

As far as changing ports, the ethernet library that I used is very limited - it can only allow ports from 1 - 255 (8 bits). It is able to be changed in software though.

Please do not use the project over an external ethernet connection without some extra security. THE LIBRARY USES QUITE A FEW SHORTCUTS THAT ARE VERY INSECURE AND OPEN TO HACKING. Even if you add a login screen, then there is no guarantee that you can mahe it unhackable :-)
crorat3 years ago
realy good project, i have prroblem finding atmega in my countri could you please tell me is anyone of this useble, thanks

http://www.chipoteka.hr/?module=moduli%2Fshop&moduleS=index&moduleLinkID=22&search=atmega&traziField=atmega
va2phl3 years ago
Super !

I upload this code and it works really fine. Will be able to use it on the lan and on the wan side.
Darksead3 years ago
Thanks!!!
Now I can start making a board for this project. I searched for project like this in russian sites but a couldn’t find. This site and your project help me!
Darksead3 years ago
Hi,
I’m Russian student, so I don’t speak English very good! This project is so interesting, but I have sum trouble:
1) What kind of compiles you have used?
2) Can you give me .hex file for Atmega88, that I can load into my processor?
drj113 (author)  Darksead3 years ago
Thats never a problem - you already speak enough English for us to communicate!

1) I use the Arduino compiler which is built into the IDE.
2) There is no .hex file. The IDE programs the AtMega168 for me.....

Have a look at the Arduino - the micro in this project looks like that!


rod27cn3 years ago
Hi drj113,

Great!
I got the files now there is no error, thanks for your help!
rod27cn3 years ago
Hi,

Please help me, where can I find: etherShield.h ?

I have this error like below when compiling the code:
25: error: etherShield.h: No such file or directory In function 'void setup()':

Please advise.

Thanks!
drj113 (author)  rod27cn3 years ago
You will need the Ethershield library from Nuelectronics.com

Here is the link..

http://www.nuelectronics.com/download/projects/etherShield.zip