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.

Geancarlo2's Content

There have been 70 items by Geancarlo2 (Search limited from 20-April 23)


By content type

See this member's


Sort by                Order  

#41070 static bool

Posted by Geancarlo2 on 06 December 2012 - 02:23 AM in Netduino 2 (and Netduino 1)

These two methods are not equivalent. The last one only Reads once. Did you mean something like this instead, which is definitely way too verbose?


I think you missed the last line inside the loop since you tried to assign a bool to a delegate :P



#40957 microcontroller

Posted by Geancarlo2 on 04 December 2012 - 06:40 PM in Project Showcase

...

"like" B)



#40453 Any ETAs for Netduino Plus 2 Fixes?

Posted by Geancarlo2 on 30 November 2012 - 12:55 AM in Netduino Plus 2 (and Netduino Plus 1)

So get a shot of reality here, Chris last post was just 6 days ago...

/irony?

The issue at hand is no word from anyone representing "Secret Labs", it makes people uneasy. It is a really bad course of action given the state of NP2.



#40426 Encryption on Netduino Plus

Posted by Geancarlo2 on 29 November 2012 - 02:20 PM in General Discussion

If performance is not an issue, you can adapt from http://code.google.c...Packets/Xtea.cs or the public domain implementation found on wikipedia. I'm sure you can find other c# implementations that don't use unsafe code too.



#40422 static bool

Posted by Geancarlo2 on 29 November 2012 - 01:45 PM in Netduino 2 (and Netduino 1)

The way that is coded it checks only once. To get the behaviour you want(check on each iteration):

public static void Method_6()
        {
            while (phcontroller.Read() && method_state_6)
            {
                ph.Write(false);
                Thread.Sleep(1 * SecondMs);
                ph.Write(true);
                Thread.Sleep(5 * MinuteMs);

            }
}

or +verbose:
public static void Method_6()
        {
            while (phcontroller.Read()==true && method_state_6 == true)
            {
                ph.Write(false);
                Thread.Sleep(1 * SecondMs);
                ph.Write(true);
                Thread.Sleep(5 * MinuteMs);

            }
}

or ++(really unnecessary)verbose:
public static void Method_6()
        {
            bool phState = phcontroller.Read();
            while (phState == true && method_state_6 == true)
            {
                ph.Write(false);
                Thread.Sleep(1 * SecondMs);
                ph.Write(true);
                Thread.Sleep(5 * MinuteMs);
                phState = phcontroller.Read();
            }
}

To be honest, I think you should study a good c# book before moving forward with your project... your questions are language/logic related. Don't let the difficulties discourage you, gather more knowledge and when you succeed it'll be even more gratifying.



#40383 static bool

Posted by Geancarlo2 on 28 November 2012 - 06:43 PM in Netduino 2 (and Netduino 1)

No problem :P
in that case you can create the variable outside the scope of the method.

static bool nutrientState = false;//initial value
public static void Method_7()
        {
            nutrientState = phcontroller.Read();//read the port and assign result to nutrientState
            while (nutrientState == true)//run until nutrientState is set to false            
            {
                a.Write(false);
                Thread.Sleep(5454);
                a.Write(true);
                b.Write(false);
                Thread.Sleep(3000);
                b.Write(true);
                Thread.Sleep(5 * MinuteMs);
            }
        }

Here it is a static class member and you can set it to false somewhere else. Of course if you set nutrientState to false while it is performing the stuff inside the loop, it'll complete it first and then check nutrientState - if this is not the behaviour you want, you must take a moment and rethink how to implement your logic.



#40379 static bool

Posted by Geancarlo2 on 28 November 2012 - 04:56 PM in Netduino 2 (and Netduino 1)

You can't create static members in the scope of a method. If the compiler/vs doesn't let you, you are probably wrong...

This does what you want:

public static void Method_7()
        {
            bool nutrientState = phcontroller.Read();
            while (nutrientState == true)            
            {
                a.Write(false);
                Thread.Sleep(5454);
                a.Write(true);
                b.Write(false);
                Thread.Sleep(3000);
                b.Write(true);
                Thread.Sleep(5 * MinuteMs);
            }
        }


phcontroller.Read() is a method call and returns a bool. nutrientState stores the value returned. When you compare it in "nutrientState == true", phcontroller.Read() is not called again, the value stored in nutrientState is used.

Note that the way it is coded, the loop will run forever until the thread is aborted.



#40292 Questions about Netduino+2, realtime and netmf

Posted by Geancarlo2 on 27 November 2012 - 08:26 AM in Netduino Plus 2 (and Netduino Plus 1)

So for example if I am interested in this:
STM32F051R8T6 ARM Cortex-M0 32-bit microcontroller with 64KB of Flash memory

1) it is not enought to run netmf

2) if I want to develop on that cortex-m0 my only option is to buy expensive compiler suite + ide, for example Keil has the free limited to only 32kb. The first option is the "basic" @ 2000euros :blink:

correct?

so with netmf I spend a little more on CPU (Cortex M4 is 7$ for 1000pcs), but I save huge on IDE+tools?

1) correct

2) wrong. You can go with the free and open alternative: gcc toolchain for arm + openocd + eclipse cdt. Just takes a little more work and knowledge to get things up and running. There are also other free "bundles", such as CoIDE(http://coocox.org/)



#40020 javascript / node.js on NETMF

Posted by Geancarlo2 on 23 November 2012 - 04:11 PM in Netduino Plus 2 (and Netduino Plus 1)

really...........why such atrocity?



#39651 Smartphone as control panel

Posted by Geancarlo2 on 19 November 2012 - 08:05 PM in Netduino Plus 2 (and Netduino Plus 1)

Internet is not in this equation really. Like you said, all it takes is to be connected to the same access point, so you can connect to its local network address. Internet can be seen as an upperset of your local network.



#39646 Smartphone as control panel

Posted by Geancarlo2 on 19 November 2012 - 06:59 PM in Netduino Plus 2 (and Netduino Plus 1)

So you basically want an web server running on your Netduino http://forums.netdui...h__1#entry20317 + http://forums.netdui...h__1#entry23532



#38800 Introducing Netduino Plus 2

Posted by Geancarlo2 on 08 November 2012 - 10:42 PM in Netduino Plus 2 (and Netduino Plus 1)

Congratulations, Netduino Plus 2 is awesome! One thing I really liked is the power control circuitry for external peripherals. I also think it would be cool if you could squeeze in a buck regulator instead of the LDO to convert VIN_PROTECTED to 5V, thus allowing higher VIN. If you guys can perfect the firmware, exposing most of the MCU peripherals while compiling with GCC, this board will be a real winner in the NETMF world IMO.



#38123 Program in assembly language?

Posted by Geancarlo2 on 28 October 2012 - 04:45 PM in Netduino 2 (and Netduino 1)

Hi, you can erase the board and program it using ARM or Thumb instruction sets, but of course you have no access to NETMF. To be honest you should start with a simpler 8-bit microcontroller or use an emulator software for educational purposes...



#37439 Anyone try driving a relay with two output pins.

Posted by Geancarlo2 on 19 October 2012 - 04:29 PM in General Discussion

Instead of using 2 relays, you can use transistors to build a simple logic gate http://www.electroni...ic/logic_2.html http://www.electroni...ic/logic_6.html



#37278 Cosm (ex Pachube) exactly fails twice on three

Posted by Geancarlo2 on 16 October 2012 - 12:14 PM in Netduino Plus 2 (and Netduino Plus 1)

Do you get any response at all? "Common status codes include: 200 OK: request processed successfully. 401 Not Authorized: either you need to provide authentication credentials, or the credentials provided aren't valid. 403 Forbidden: Cosm understands your request, but refuses to fulfill it. An accompanying error message should explain why. 404 Not Found: either you're requesting an invalid URI or the resource in question doesn't exist (eg. no such feed). 422 Unprocessable Entity: Cosm was unable to create a feed because the EEML/JSON was not complete/valid (e.g. it didn't include a "title" element). 500 Internal Server Error: Something went wrong... Please post to the forum about it and we will investigate. 503 No server error: usually occurs when there are too many requests coming into Cosm - if you get this from an API request then the error message will be returned in XML in the response." https://cosm.com/docs/v2/



#37165 What About PICAXE for 1-Wire Support

Posted by Geancarlo2 on 14 October 2012 - 05:52 PM in General Discussion

IMO, Netduino should provide One-Wire support in the standard firmware instead lol



#37154 ADC Question / Issue

Posted by Geancarlo2 on 14 October 2012 - 05:55 AM in Netduino Go

In any case, if you still have problems you can use linear regression for calibration.



#36404 Help with first Eagle board

Posted by Geancarlo2 on 02 October 2012 - 07:35 AM in General Discussion

You should also make wider power traces and if you are making it 2-layer, make a Vcc plane/pour to make routing easier and reduce noise.



#36274 Netduino Pins aways in High Voltage

Posted by Geancarlo2 on 29 September 2012 - 09:32 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Paulo, can you post what circuit are you using? Do you have an appropriate resistor between the port and the led? P.S.: "Tension" is voltage, they are interchangeable terms in portuguese, although "voltagem" isn't well accepted among professionals...



#36030 More GoBus news: DIP chips for STM8S modules

Posted by Geancarlo2 on 26 September 2012 - 09:21 PM in Netduino Go

You guys have it way too easy, try being a geek in Brazil :lol:



#35753 timer question

Posted by Geancarlo2 on 22 September 2012 - 01:36 AM in Netduino 2 (and Netduino 1)

Given that your program knows when it is turning lights on or off, it's just a matter of storing what you did and when you did. If you know 100% sure that netduino will be working uninterrupted, you can probably use DateTime.Now and figure how to work your requirements out. Otherwise, you should consider getting a RTC chip with some memory+battery...



#35598 5volt question

Posted by Geancarlo2 on 20 September 2012 - 03:45 PM in Netduino 2 (and Netduino 1)

200mA is the maximum ammount of current the microcontroller I/Os can draw(Page 14 http://www.atmel.com/Images/6120s.pdf) The maximum current on the 5V rail depends on what voltage you are feeding the board with, but in general you should be ok with up to 800 mA. It pretty much depends if you are able to sink the heat dissipated.(http://www.onsemi.co...l/MC33269-D.PDF)



#35549 Question on a Circuit

Posted by Geancarlo2 on 19 September 2012 - 09:00 PM in General Discussion

Hi, if you want minimal part count maybe ds1722 will work better for you. It's also cheaper..



#35468 Analog in put C# coding

Posted by Geancarlo2 on 18 September 2012 - 11:57 AM in General Discussion

Heey Mr. Vernari thanks for your response. Yes, I am using Arduino(Ardupilot)system. EZ1-Ardupilot-3.3V battery. It works really fine with the USB port connection 5V and yes I have 4 different 3.3v batteries brand new but for any unknown reason, when I connect the 3.3v on it, the ultrasonic conversion leads to significant errors. Noise. Any Ideas, I know it is weird.

Follow the datasheet's instructions to calibrate the sensor and adjust your code to take this into account:

AN – Outputs analog voltage with a scaling factor of (Vcc/512) per
inch. A supply of 5V yields ~9.8mV/in. and 3.3V yields ~6.4mV/in.
The output is buffered and corresponds to the most recent range data.




#35222 HID Support?

Posted by Geancarlo2 on 15 September 2012 - 01:48 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi, these topics probably will help you http://forums.netdui...h__1#entry16883 http://forums.netdui...tion-using-usb/




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.