Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

Frickr's Content

There have been 6 items by Frickr (Search limited from 23-September 23)


By content type

See this member's

Sort by                Order  

#43352 We snuck a GoBus 2.0 feature into the latest firmware...

Posted by Frickr on 14 January 2013 - 02:58 AM in Netduino Go

ok thank you works great now!




#43349 We snuck a GoBus 2.0 feature into the latest firmware...

Posted by Frickr on 14 January 2013 - 01:18 AM in Netduino Go

Managed to get the Blinky example working after some jiggery pokery with the project references :)

 

Regards,

Mark

what references did you need to change to get this working? i added the new sheildbase.dll and i dont see the ONBOARD_LED.




#43348 Netduino Go Firmware v4.2.2

Posted by Frickr on 14 January 2013 - 01:01 AM in Netduino Go

Hi Frickr, Did you change your deployment target from "NetduinoGo" to "Netduino"? We needed to make the name change to enable some of the new and future scenarios for Netduino Go. The new Netduino Go application templates will all use the new name by default. Chris

 

yes i did change it, and that was my problem. it still comes up as NetduinoGo_netduino but everything functions as it should as far as i can tell.




#43307 Netduino Go Firmware v4.2.2

Posted by Frickr on 13 January 2013 - 08:26 PM in Netduino Go

i think im getting the same error on mine. except i get an error saying "Error 2 Device not found or cannot be opened - USB:NetduinoGo"

 

 edit: ok i think i see what im doing wrong here, i just need to read a little more closely. ill report back on if i solved my own issues.  




#43006 Coding troubles

Posted by Frickr on 09 January 2013 - 02:46 PM in Netduino Go

the alarm state2 in the flush sequence fails to activate, it goes right though the flush sequence loop and skips right over the alarm sequence. it seems like theres an issue with the layering and how each line is exicuted.

 

i rewrote alot of the code last night and added a few more things. now i have a new set of problems, first - the run cycle works fine and as it should, the alarm turns on as expected, and the reset button stops the alarm, but then the code continues to the flush cycle instead of shutting down.

 

when it gets to the flush cycle, and i activate the switch for the alarm state, it now goes into the alarm loop, and gets stuck there. the reset button wont break it out of the loop and it keeps the loop active even though the alarm switch is back to a normal state.

 

also im trying to add a manual and an auto sequence to the code. but when i enter the manual, it gets stuck in the loop even though i change the state of the while loop by flipping the switch to the auto side.

 

my next big move is to add some timing functions to the code where after 8 hours of time in "run" it will start the flush sequence, then go back to the run sequence. but i still have alot more reading to do on that. 

 

i feel like im just having issues with the order of operation. i may record a video of my problem later on this afternoon if it would be at all helpful.

 

Thank you guys so much for helping me out with this, im looking forward to learning alot from this community.

 

heres my new revised code

 

namespace RO1{    public class Program    {        public static void Main()        {            //two float switches [high, low] activate the system when the tank drains, deactivates system when full,            //3 modes: run, flush, rest,            //Run: SolIn opens, sleep for 1 second, pump turns on, sleep 10 seconds, check for flow, if no flow system            //shuts down and alarm sounds,            //After tank full or 8 hours of Run, Flush sequense initiated,            //Flush: pump on, SolFlush opens, SolIn closes, check flow after 10 seconds if no flow alarm, sleep 1 minute,             //pump off, SolFlush closes, sleep 30 mins.            //Include MOA switch keeping timing for flush sequence.                        NetduinoGo.ShieldBase shieldBase = new NetduinoGo.ShieldBase(GoSockets.Socket5);            OutputPort solIn = new OutputPort(shieldBase.Pins.GPIO_PIN_D3, false);            OutputPort solFlush = new OutputPort(shieldBase.Pins.GPIO_PIN_D4, false);            OutputPort pump = new OutputPort(shieldBase.Pins.GPIO_PIN_D5, false);            OutputPort Buzzer = new OutputPort(shieldBase.Pins.GPIO_PIN_D9, false);            InputPort high = new InputPort(shieldBase.Pins.GPIO_PIN_D6, false, Port.ResistorMode.PullUp);            InputPort low = new InputPort(shieldBase.Pins.GPIO_PIN_D7, false, Port.ResistorMode.PullUp);            InputPort alarm = new InputPort(shieldBase.Pins.GPIO_PIN_D8, false, Port.ResistorMode.PullUp);            InputPort reset = new InputPort(shieldBase.Pins.GPIO_PIN_D2, false, Port.ResistorMode.PullUp);            InputPort auto = new InputPort(shieldBase.Pins.GPIO_PIN_D10, false, Port.ResistorMode.PullUp);            InputPort manual = new InputPort(shieldBase.Pins.GPIO_PIN_D11, false, Port.ResistorMode.PullUp);            bool highState = false;            bool lowState = false;            bool flushseq = false;            bool alarmState = false;            bool runState = false;            bool flushState = false;            bool resetState = false;            bool autoState = false;            bool manualState = false;            autoState = auto.Read();            resetState = reset.Read();            manualState = manual.Read();            while (autoState)            {                //2 float switches controlling tank level                highState = high.Read();                lowState = low.Read();                                if (!highState)                {                                    if (!lowState)                    {                        runState = true;                                           }                }                if (flushseq)                {                    if (highState)                    {                        if (lowState)                        {                            flushState = true;                        }                    }                }                //Run: SolIn opens, sleep for 1 second, pump turns on, sleep 10 seconds, check for flow, if no flow system                //shuts down and alarm sounds,                while (runState)                {                     solIn.Write(true);                    Thread.Sleep(1000);                    pump.Write(true);                    Thread.Sleep(5000);                    alarmState = alarm.Read();                    flushseq = true;                    runState = false;                }                //Flush: pump on, SolFlush opens, SolIn closes, check flow after 10 seconds if no flow alarm, sleep 1 minute,                 //pump off, SolFlush closes, sleep 30 mins.                while (flushState)                {                    pump.Write(true);                    solIn.Write(false);                    solFlush.Write(true);                    Thread.Sleep(5000);                    alarmState = alarm.Read();                      Thread.Sleep(1000); //60000                    pump.Write(false);                    solFlush.Write(false);                    Thread.Sleep(1000); //1800000                    flushseq = false;                    flushState = false;                }                    while(alarmState)                {                    solIn.Write(false);                    solFlush.Write(false);                    pump.Write(false);                    Buzzer.Write(true);                    Thread.Sleep(1000);                    Buzzer.Write(false);                    Thread.Sleep(1000);                    if (resetState)                    {                        break;                     }                }            }            while (manualState)            {                solIn.Write(true);                Thread.Sleep(1000);                pump.Write(true);            }        }    }}



#42988 Coding troubles

Posted by Frickr on 09 January 2013 - 01:18 AM in Netduino Go

im very new to netduino, and programming in general. i've been reading a ton, and have learned alot, this forum being one of the biggest helps to me as far as getting started. after working through all the updating for the shield base, i started working on my project for a reverse osmosis system that i am currantly building and would like to include a netduino to power it.

 

my first question is, after writing the code for the netduinoGo, how hard is it to transfer it over to the mini? the small size is appealing for this project, and the go makes a great prototyping board.

 

secondly im having some troubles with my code for it. everything works fine except for the alarm sequence on the flush cycle. the code is identical to the run cycle, which works as intended, but doesnt work when it gets to the flush cycle.

 

also on the alarm sequence how would i go about setting up a reset button to cancel out of the while loop?

 

thanks for your help, and if you see any major defects or ways i can organize better please let me know.

heres the code:

 

 public static void Main()        {            //two float switches [high, low] activate the system when the tank drains, deactivates system when full,            //3 modes: run, flush, rest,            //Run: SolIn opens, sleep for 1 second, pump turns on, sleep 10 seconds, check for flow, if no flow system            //shuts down and alarm sounds,            //After tank full or 8 hours of Run, Flush sequense initiated,            //Flush: pump on, SolFlush opens, SolIn closes, check flow after 10 seconds if no flow alarm, sleep 1 minute,             //pump off, SolFlush closes, sleep 30 mins.            //Include MOA switch keeping timing for flush sequence.                        NetduinoGo.ShieldBase shieldBase = new NetduinoGo.ShieldBase(GoSockets.Socket5);            OutputPort solIn = new OutputPort(shieldBase.Pins.GPIO_PIN_D3, false);            OutputPort solFlush = new OutputPort(shieldBase.Pins.GPIO_PIN_D4, false);            OutputPort pump = new OutputPort(shieldBase.Pins.GPIO_PIN_D5, false);            OutputPort Buzzer = new OutputPort(shieldBase.Pins.GPIO_PIN_D9, false);            InputPort high = new InputPort(shieldBase.Pins.GPIO_PIN_D6, false, Port.ResistorMode.PullUp);            InputPort low = new InputPort(shieldBase.Pins.GPIO_PIN_D7, false, Port.ResistorMode.PullUp);            InputPort alarm = new InputPort(shieldBase.Pins.GPIO_PIN_D8, false, Port.ResistorMode.PullUp);            bool highState = false;            bool lowState = false;            bool flushseq = false;            bool alarmState1 = false;            bool alarmState2 = false;            bool runState = false;            bool flushState = false;                        while (true)            {                //2 float switches controlling tank level                highState = high.Read();                lowState = low.Read();                alarmState1 = alarm.Read();                alarmState2 = alarm.Read();                 if (!highState)                {                                    if (!lowState)                    {                        runState = true;                                           }                }                if (flushseq)                {                    if (highState)                    {                        if (lowState)                        {                            flushState = true;                        }                    }                }                //Run: SolIn opens, sleep for 1 second, pump turns on, sleep 10 seconds, check for flow, if no flow system                //shuts down and alarm sounds,                if (runState)                {                    solIn.Write(true);                    Thread.Sleep(1000);                    pump.Write(true);                    Thread.Sleep(10000);                    if (alarmState1)                        while (true)                        {                            solIn.Write(false);                            pump.Write(false);                            Buzzer.Write(true);                            Thread.Sleep(1000);                            Buzzer.Write(false);                            Thread.Sleep(1000);                        }                    flushseq = true;                    runState = false;                }                //Flush: pump on, SolFlush opens, SolIn closes, check flow after 10 seconds if no flow alarm, sleep 1 minute,                 //pump off, SolFlush closes, sleep 30 mins.                if (flushState)                {                    pump.Write(true);                    solIn.Write(false);                    solFlush.Write(true);                    Thread.Sleep(10000);                    if (alarmState2)                        while (true)                        {                            solIn.Write(true);                            solFlush.Write(false);                            pump.Write(false);                            Buzzer.Write(true);                            Thread.Sleep(1000);                            Buzzer.Write(false);                            Thread.Sleep(1000);                        }                    Thread.Sleep(1000); //60000                    pump.Write(false);                    solFlush.Write(false);                    Thread.Sleep(1000); //1800000                    flushseq = false;                    flushState = false;                }            }        }    }}

 





home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.