| Arduino Forum ::  Members :: muda
 Show Posts Pages: 1 [2]
 16 Using Arduino / Programming Questions / Re: Please help with aquarium lights. on: August 10, 2011, 10:10:40 am Quote from: David Pankhurst on August 10, 2011, 03:44:27 amThe item "sizeof(bluepercent)/sizeof(bluepercent[0])" is a way to indicate your array length without putting a specific value in it - as you add/remove from the bluepercent array, the count will always be correct. As well, 'i' can start counting at 0, not 1.David, This value is used to calculate many other parameters. Now it become too complicated as is very masive. For example :  if (((ontime * 60) + photoperiod + whiteramptime + 2*blueramptime + (blueramptime/10*9)) >= daybyminute)Now i need to use "sizeof(bluepercent)/sizeof(bluepercent[0])"  instead of 10. And "sizeof(bluepercent)/sizeof(bluepercent[0])" -1  instead of 9.becomes :  if (((ontime * 60) + photoperiod + whiteramptime + 2*blueramptime + (blueramptime/sizeof(bluepercent)/sizeof(bluepercent[0])*sizeof(bluepercent)/sizeof(bluepercent[0])-1)) >= daybyminute)Seems crazy to me    Please advice on this. Can I do like that:Int array;array = sizeof(bluepercent)/sizeof(bluepercent[0]); if (((ontime * 60) + photoperiod + whiteramptime + 2*blueramptime + (blueramptime/array*(array-1))) >= daybyminute)
 17 Using Arduino / Programming Questions / Re: Please help with aquarium lights. on: August 10, 2011, 09:07:52 am Thanks David ,Thats exactly what I wanted. I will try it and report back how things are going.Thanks Paul,There are other procedures in the code too, that are responsible for fading sped, start time etc. ... I just wanted to be simple here .
 18 Using Arduino / Programming Questions / Re: Please help with aquarium lights. on: August 10, 2011, 02:13:37 am Hi,Thanks for input. That was exactly one thing what I understood by myself  May be I need to paste more of the sketch  ?Can anybody explain what is (i). If I can give different names for this like (i) and (f)  , then I can run both at the same time ?
 20 Using Arduino / Displays / Re: LCD randomly reverts to displaying hieroglyphs on: July 07, 2011, 07:55:49 am One more updateGuys advised to twist all signal wires with ground. I will try where it is possible. LCD is connected via 8 wires and i dont know if it is good idea also using twist idea there ,or shielding is more advanced. I can only work with arduino when lights come down in tank and that's is damn hard.
 21 Using Arduino / Displays / Re: LCD randomly reverts to displaying hieroglyphs on: July 05, 2011, 03:15:15 pm Now only manual switching of pumps troubles LCD. Would shielded cable for LCD connection help ?
 22 Using Arduino / Displays / Re: LCD randomly reverts to displaying hieroglyphs on: July 04, 2011, 07:06:20 am Added magnetic chocke to 12v powerline. So far - so good.
 23 Using Arduino / Displays / Re: LCD randomly reverts to displaying hieroglyphs on: July 03, 2011, 02:41:16 am I will try to move components apart. Its the most easy test at the moment anyway. floresta,Characters move to the left. 1st line to 3rd and 2nd to 4th. Sometimes blinking cursor appears somewhere. Sometimes all is just stationary.
 24 Using Arduino / Displays / Re: LCD randomly reverts to displaying hieroglyphs on: July 02, 2011, 08:38:03 am This is how it usually looks. Temp sensors disconneced- so -127Forgot to mention -  hieroglyphs are scrolling.  Roughly 1 character per second.
 25 Using Arduino / Displays / Update on: July 02, 2011, 06:31:51 am Just noticed.  LCD reverted to hieroglyphs after my auto-top-of  system kicked in. But it is 100% separate system. 240v pump supply and 5v controller supply are connected to same 240v power outlet though. Is it interference via power cables or magnetic interference via air ?
 26 Using Arduino / Displays / Re: LCD randomly reverts to displaying hieroglyphs on: July 02, 2011, 05:56:36 am Cant switch of lights for now as corals are sensitive animals. First need to master another source. Then I try to run controller separately if better solution will not appear till then.Wiring : http://www.reefledcontroller.com/images/lcd_bb.png   except connect to pins 13, 12, 7, 6, 5, 4 instead of 12, 11, 5, 4 , 3, 2
 27 Using Arduino / Displays / Re: LCD randomly reverts to displaying hieroglyphs on: July 01, 2011, 01:42:11 pm I use this LCD :http://cgi.ebay.com/HD44780-20x4-LCD-module-Blue-backlight-Free-pin-header-/320537704483?pt=LH_DefaultDomain_0&hash=item4aa1893823#ht_2302wt_1017All stuff is placed separated from aquarium - so its not wet. I checked wiring and soldering twice, also executed "earthquake" test.  Arduino is used for PWM controlling LED lights. Lights has own 24V  ps and driver. I disconnected all relays  for now. I can simulate event by plugging in-out other devices to same power outlet where arduino 12v PS sits. I need several tries to trigger usually.  And in real life its happening by itself, with no side intervention.Im using code v1.03 from there : http://code.google.com/p/aquatroller/downloads/list Hyeroglyphs are difficult do describe. Just strange unseen characters all over screen. Randomly screen is blank at all. Sometimes I  can see clock ticking through hyeroglyphs but differently placed .
 28 Using Arduino / Displays / LCD randomly reverts to displaying hieroglyphs on: July 01, 2011, 07:00:23 am LCD randomly reverts to displaying kind of hieroglyphsAfter LCD go berserk, program on arduino continues working properly. After resetting arduino all returns to normal.Guys was discussing this on aquarium forum, and most suspected that it is interference from switching on and of other electric equipment. Anyone else  has experienced this  and successfully overcome ? LCD is standard 20 x 4  and duemilanove
 Pages: 1 [2]