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

Member Since 05 Jan 2013
Offline Last Active Feb 11 2015 12:19 PM
-----

Posts I've Made

In Topic: We snuck a GoBus 2.0 feature into the latest firmware...

14 January 2013 - 02:58 AM

ok thank you works great now!


In Topic: We snuck a GoBus 2.0 feature into the latest firmware...

14 January 2013 - 01:18 AM

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.


In Topic: Netduino Go Firmware v4.2.2

14 January 2013 - 01:01 AM

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.


In Topic: Netduino Go Firmware v4.2.2

13 January 2013 - 08:26 PM

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.  


In Topic: Coding troubles

09 January 2013 - 02:46 PM

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);            }        }    }}

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.