Forum Replies Created
-
AuthorPosts
-
vladimirdMember@vladimird wrote:
@dpackham wrote:
noticed that you had some dupes in defines.h here is my working ones
// ===== Added for Freetronics LCD Shield =====
#define PIN_LCD_RS 8 // LCD rs pin – default = 19
#define PIN_LCD_EN 9 // LCD enable pin – default = 18
#define PIN_LCD_D4 2 // LCD d4 pin – default = 20 -DKP- or D2 for the LCD shield stacked on a net card that uses D4 for the SDcard
#define PIN_LCD_D5 5 // LCD d5 pin – default = 21
#define PIN_LCD_D6 6 // LCD d6 pin – default = 22
#define PIN_LCD_D7 7 // LCD d7 pin – default = 23
#define PIN_LCD_RS 8 // LCD rs pin – default = 19
//#define PIN_LCD_BACKLIGHT 10 // LCD backlight pin – default = 12 -DKP- net shield uses D10 as well. so I have backlight always on
#define PIN_LCD_CONTRAST 36 // LCD contrast pin – default = 13
#define PIN_ETHER_CS 37 // Ethernet controller chip select pin – default = 4
#define PIN_SD_CS 38 // SD card chip select pin – default = 0
#define PIN_RAINSENSOR 39 // rain sensor is connected to pin D3 – default = 11
#define BUTTON_ADC_PIN A0 // A0 is the button ADC inputYou are my hero, I will try to apply this to my setup.
Would be good to use if statements in order to remain compatible with the main code maintained by ray.If NTP works than I can continue to modify code for my purposes of heating controller.
I managed to get it working following your suggestions.
Only isue is that is still freezes once in day or 2.
I couldn’t figure out why and I made a workaround. A watchdog on Openwrt router.
As my Arduino is powered from TPlink 824nd with Openwrt on it I used it to powercycle arduino if it doesn’t reply to ping in 3 minutes in cron in openwrtI have my setup switching on and off my heating and some lights.
Do anybody know how hard would it be to port 2.0.2 code to standard Arduono shield in this thread knowing that 2.0 is the base?
vladimirdMember@dpackham wrote:
noticed that you had some dupes in defines.h here is my working ones
// ===== Added for Freetronics LCD Shield =====
#define PIN_LCD_RS 8 // LCD rs pin – default = 19
#define PIN_LCD_EN 9 // LCD enable pin – default = 18
#define PIN_LCD_D4 2 // LCD d4 pin – default = 20 -DKP- or D2 for the LCD shield stacked on a net card that uses D4 for the SDcard
#define PIN_LCD_D5 5 // LCD d5 pin – default = 21
#define PIN_LCD_D6 6 // LCD d6 pin – default = 22
#define PIN_LCD_D7 7 // LCD d7 pin – default = 23
#define PIN_LCD_RS 8 // LCD rs pin – default = 19
//#define PIN_LCD_BACKLIGHT 10 // LCD backlight pin – default = 12 -DKP- net shield uses D10 as well. so I have backlight always on
#define PIN_LCD_CONTRAST 36 // LCD contrast pin – default = 13
#define PIN_ETHER_CS 37 // Ethernet controller chip select pin – default = 4
#define PIN_SD_CS 38 // SD card chip select pin – default = 0
#define PIN_RAINSENSOR 39 // rain sensor is connected to pin D3 – default = 11
#define BUTTON_ADC_PIN A0 // A0 is the button ADC inputYou are my hero, I will try to apply this to my setup.
Would be good to use if statements in order to remain compatible with the main code maintained by ray.If NTP works than I can continue to modyfy code for my purposes of heating controler.
vladimirdMember@dpackham wrote:
@rszimm wrote:
Dave, my release (which I’ve been calling sprinklers_pi) was originally built on a 2560 with the W5100 ethernet interface. You should be able to get it running. It’s essentially the exact same code as here: viewtopic.php?f=28&t=244 except it doesn’t support the graphing logging stuff. Besides that however, you wouldn’t really know you were running the raspberry pi version or the version on the 2560. If you’re at all interested, (or anyone else is), I could polish that code up and ship it over…
can you enable logging with the microsd card?
i think Riszimm didnt put loging on mega version because of lack of resources- Ram
Let see what he will reply when he comes back to forum.
vladimirdMember@dpackham wrote:
ok I got the RTC. works well. now I think i am seeing the same problem with the LCD shield. if its on I get LCD txt and messages. but network fails. if i remove it network works but NTP fails..
its the 5100 board so cant we use the original arduino libs?
do you have to mod the LCD to work? I have the Sainsmart lcd/keypad that uses A0 for the keys.
thoughts?
U have the same hardware and same problems.
I use keypad and lcd to disable NTP and setup ip and rest.
For normal usage I use just RTC and no display and keypad.
Than it works.
To me Rizmm code semas more promising although I am worried about ram issue if I add more libraries. And also I have never used VS before and at first look seams much more complicated then Arduino.
vladimirdMember@rszimm wrote:
I looked at the Visual Micro site (http://www.visualmicro.com/) and apparently the Express Editions don’t work. Ugh. Only VS 2008-2013.
If only Arduino had made their stuff build with a normal makefile. OK, maybe I’ll spend a bit of time here trying to get this to compile with the Atmel Studio (which is free). In the mean time, if you happen to have one of the full versions of Visual Studio, have at it!
I have managed to have it compiled on VS 2010.
And web server works pretty well.
I have to check now for output and how to modify the code for my needs. It seams much harder to read then standard arduino. At least here NTP works ok.
Thank again Rszimm.-Rich
vladimirdMemberI have RTC and it is working but with some bags. I dont now if this is hardware problem.
RTC is connectet to I2c interface SLC SDA GND and +5v.
I would still prefer to get NTP working as it is more acurate and anyway it is allways connected to net., but dont have knowledge how to debug network.
vladimirdMemberThanks for yoyr help! Looking forward for Atmel studio version.
vladimirdMember@rszimm wrote:
I just uploaded the latest build. You can get it here : http://stuff.intelligent-isi.com/sprinklers_pi/sprinklers_avr-1.0.0.tar.gz
It’s built with either the Visual Micro plugin for Visual Studio, or else the version 2012-05-23 Arduino.mk makefile on a linux platform (what a pain in the ass that thing is..)
When you start it up, it currently binds to IP address 192.168.10.20 and port 8080. You can change that via the web page, or you can edit the code to make it something that works on your network.
There’s a tftp server built in to upload the web pages to the SD card. There’s a little bash shell script called xfer that you can use to ease the upload. OR, simply use your desktop to copy the files in the web directory to a /web folder on the SD card.
Good luck!
I apologize that there’s not a whole lot of step-by-step here. If there’s interest I can go into more depth…
Hi Riszimm.I tought I could do it on my own but it seams i went the wrong waz bz downloading atmel studio 6.1 instead of Visal studio. Which version ov Visual studio I should use. Is express edition enaugh and which one?
Mybe I dont need step by step but at least some guidance.Thanks Vladimir
vladimirdMember@vladimird wrote:
I have it working partialy. it was blocking at boot but i found out that NTP ocption was blocking it. after disabling ntp it started to work. Stil have it sometimes blocke but removing lcd and keypad helps.
I cant mangae to get NPT clock work and now also have some problem with hardware rtc1307. When I disconect RTc module web server works. the best would be to make NTP work as anyway it is connectet to internet all the time.
Did anyone alse tried opensprikler on MEGA 2560 + LCD-Keypad + RTC DS1307?
Dave did you had NTP working or it was only RTC?
vladimirdMemberI have it working partialy. it was blocking at boot but i found out that NTP ocption was blocking it. after disabling ntp it started to work. Stil have it sometimes blocke but removing lcd and keypad helps.
vladimirdMember@plainolddave wrote:
Hi again everyone
Looks like we’ve all had the same idea to run on whatever hardware was lying around – thanks for your postings
Have posted a new version above that seems to fix the stability issues( or get from here -> https://www.dropbox.com/sh/nkhbt81kyvycyzy/LUWh8It6Ph)
For vladimird – can’t quite see what the issue was from the error messages so have zipped up a copy of the libraries I’ve been using that compile fine – maybe have another try and let me know how you go?
Cheers
Dave
I have removed libraries downlaoded from internet and used yours posted here. Now it compiles without errors.
Thanks!
vladimirdMember@rszimm wrote:
I just uploaded the latest build. You can get it here : http://stuff.intelligent-isi.com/sprinklers_pi/sprinklers_avr-1.0.0.tar.gz
It’s built with either the Visual Micro plugin for Visual Studio, or else the version 2012-05-23 Arduino.mk makefile on a linux platform (what a pain in the ass that thing is..)
When you start it up, it currently binds to IP address 192.168.10.20 and port 8080. You can change that via the web page, or you can edit the code to make it something that works on your network.
There’s a tftp server built in to upload the web pages to the SD card. There’s a little bash shell script called xfer that you can use to ease the upload. OR, simply use your desktop to copy the files in the web directory to a /web folder on the SD card.
Good luck!
I apologize that there’s not a whole lot of step-by-step here. If there’s interest I can go into more depth…
Hi Rszimm,
Thanks, for uploading your code.
I havet used atmel studio till now.
I will try to download install and test your code on hardware.
Hope it is not to much complex comparing to arduino.
Will post here the experiance.
vladimirdMember@rszimm wrote:
Dave, my release (which I’ve been calling sprinklers_pi) was originally built on a 2560 with the W5100 ethernet interface. You should be able to get it running. It’s essentially the exact same code as here: viewtopic.php?f=28&t=244 except it doesn’t support the graphing logging stuff. Besides that however, you wouldn’t really know you were running the raspberry pi version or the version on the 2560. If you’re at all interested, (or anyone else is), I could polish that code up and ship it over…
Could you post your code for Mega2560. I am doing some interval timers for Heating and home automation and this would help me learn from exampoles.
vladimirdMember@plainolddave wrote:
No worries – thanks Ray
After testing for a week or so it seems to hang at odd intervals every two to three days. Working hypothesis for whats causing the issue is either:
1) buffer overrun – I’d opened port 8080 to the internet so wondering if the input was being flooded occasionally? (i.e. port scanners, malware etc) – have closed it now to see if makes any difference
2) slow memory leak (sigh)Will look at some diagnostics when I get a chance , however in the meantime a watchdog will do the trick to keep it running
In fairness – porting to the W5100 ethernet is just a bit of fun to reuse what I had…. wouldn’t be recommending to do it this way if you were staring from scratch (just order an opensprinkler! 😀 )
Cheers
Dave
Hi Dave I am very interested for using your code . I have the same hardware but have problem copmiling the code.
I get error in line 243 of EtherCard_W5100.cpp:
EtherCard_W5100.cpp: In static member function ‘static byte EtherCard::packetLoopIcmpCheckReply(const byte*)’:
EtherCard_W5100.cpp:243: error: no matching function for call to ‘ICMPPing::ICMPPing(SOCKET&)’
C:Program FilesArduinolibrariesicmp_ping/ICMPPing.h:125: note: candidates are: ICMPPing::ICMPPing(SOCKET, uint8_t)
C:Program FilesArduinolibrariesicmp_ping/ICMPPing.h:113: note: ICMPPing::ICMPPing(const ICMPPing&)
EtherCard_W5100.cpp:244: error: no match for call to ‘(ICMPPing) (int, byte [4], char [])’
C:Program FilesArduinolibrariesicmp_ping/ICMPPing.h:136: note: candidates are: ICMPEchoReply ICMPPing::operator()(const IPAddress&, int)
C:Program FilesArduinolibrariesicmp_ping/ICMPPing.h:147: note: void ICMPPing::operator()(const IPAddress&, int, ICMPEchoReply&)Do you know why it could be. I downloaded the librairies listed and iported to arduino 1.0.5 version.
Thanks for help.
vladimirdMemberThanks you very much for the fast answer. I will try to find it.
-
AuthorPosts