Code for power expansion module

Do you have a question on how to do something.
Ask in here.

Posts: 147
Joined: Sun Mar 20, 2011 1:22 pm
PostPosted: Tue Aug 16, 2016 2:58 pm
Hey everyone .Just wondering if someone can help me write some code for my Power expansion.
Id like to control 2 fans that turn on due to the temp sensors.

Fan1 turn on if temp1 reaches 80.6F and turns off at 78.9F
Fan2 turn on if temp2 reaches 90.0F and turns off at 85F

Ideal for fan 2 would be a ramp up %. 50%(6vdc) at 85.0F and 100%(12vdc) at 90.0F
If anyone could help me with this or point me in the right direction I'd be stoaked.

Posts: 11969
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Tue Aug 16, 2016 3:03 pm
The power expansion can't do variable voltage.
Roberto.

Posts: 147
Joined: Sun Mar 20, 2011 1:22 pm
PostPosted: Tue Aug 16, 2016 7:55 pm
Ok that settled. Now how would I code it for just off and on. Example codes ?I searched and can't find anything. I have a expansion relay also. I set switches. ???

Posts: 11969
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Tue Aug 16, 2016 8:23 pm
Try this:
Code: Select all
  ReefAngel.StandardFan(Box2_Port1,780,806);
  ReefAngel.StandardFan2(Box2_Port2,850,900);
Roberto.

Posts: 147
Joined: Sun Mar 20, 2011 1:22 pm
PostPosted: Thu Aug 18, 2016 9:17 am
Awesome thank you.

Posts: 147
Joined: Sun Mar 20, 2011 1:22 pm
PostPosted: Thu Aug 18, 2016 7:25 pm
All my codes fail on the void setup() line ?
What could be wrong. Even the preloaded code and wizard compiled code. ??
User avatar
Posts: 5337
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Thu Aug 18, 2016 7:53 pm
Whats the error. Are you using the RA installer package or Arduino downloaded independently

Posts: 147
Joined: Sun Mar 20, 2011 1:22 pm
PostPosted: Fri Aug 19, 2016 1:09 pm
It was an error in the void setup() line. On all codes I tried to compile..It seems to work now.Thank you for the reply.

Posts: 147
Joined: Sun Mar 20, 2011 1:22 pm
PostPosted: Fri Aug 19, 2016 9:37 pm
I entered the above 2 lines off code. And the fans do not turn on. The status of the socket does change with the temp changes but no output from module?Interesting I have 1-8 11-18. 21-28 on my display . 21-22 are the ones that toggle. I have the module plugged directly into main box. Would I need to change code because Im not using expansion relay and expansion hub? Didn't want to mess with code. Plan on replacing burnt parts soon. Thanks.

Posts: 147
Joined: Sun Mar 20, 2011 1:22 pm
PostPosted: Sat Aug 20, 2016 12:01 pm
I got code to work. had to remove relay expansion part ,but it seems all good Thanks

Return to How do I code ...

Who is online

Users browsing this forum: No registered users and 2 guests

cron