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.

cce1911's Content

There have been 59 items by cce1911 (Search limited from 17-June 23)


By content type

See this member's


Sort by                Order  

#49963 3x4 Matrix Keypad bounce problem

Posted by cce1911 on 25 May 2013 - 06:19 PM in Netduino 2 (and Netduino 1)

I'm using this keypad: http://www.adafruit.com/product/419

with the Toolbox.NETMF.Hardware.MatrixKeyPad driver and I'm getting a lot of bounce. It appears that the "time" parameter of the event handler is not working correctly. For example, in the code below, ButtonLastPushed is initially 0 and the first time the button is pushed "time" is zero also. Has anyone else run into this problem and found a fix?

/// Triggered when a key is pressedstatic void kb_OnKeyDown(uint KeyCode, uint Unused, DateTime time) {   if (ButtonLastPushed.AddMilliseconds(intBounceWait) > time) return; // prevent bounce   ButtonLastPushed = time;   Debug.Print("Key pressed: " + KeyLookup((int)KeyCode).ToString()); }



#49970 3x4 Matrix Keypad bounce problem

Posted by cce1911 on 25 May 2013 - 09:45 PM in Netduino 2 (and Netduino 1)

I'll have to retract that last post. It does not work either. Looks like there is something wrong with the clock...




#49972 3x4 Matrix Keypad bounce problem

Posted by cce1911 on 25 May 2013 - 10:16 PM in Netduino 2 (and Netduino 1)

This is weird. The clock works. Debug printing .Now shows the clock incrementing. Maybe it is the keypad.




#50422 3x4 Matrix Keypad bounce problem

Posted by cce1911 on 11 June 2013 - 01:20 PM in Netduino 2 (and Netduino 1)

Thanks for the input Karl. I'll give your suggestion a try.

-Capel




#49967 3x4 Matrix Keypad bounce problem

Posted by cce1911 on 25 May 2013 - 08:53 PM in Netduino 2 (and Netduino 1)

To start with I'm using the N+2. Sorry about posting in the wrong forum if this has anything to do with it.

 

The value of the "time" parameter is always 00:00:00 as if there were no clock at all on board. I don't expect the board to have the current time, just the time relative to startup. I can work around my problem with the code below, but I expected the Toolbox.NETMF.Hardware.MatrixKeyPad code to work and was wondering if anyone else had seen this problem.

static void kb_OnKeyDown(uint KeyCode, uint Unused, DateTime time){   KeyDown(KeyLookup((int)KeyCode), DateTime.Now);}// Process the keypad inputstatic void KeyDown(int KeyVal, DateTime dtTime)  {  if (ButtonLastPushed.AddMilliseconds(intBounceWait) > dtTime) return; // prevent bounce  ButtonLastPushed = dtTime;...



#51669 5v Power Supply?

Posted by cce1911 on 24 July 2013 - 07:57 PM in Netduino Plus 2 (and Netduino Plus 1)

This is a great question, but I'm curious to know what people are using for battery packs. My N+2 is driving a single 4 channel relay board...




#51766 Adafruit Motor shield v2 library

Posted by cce1911 on 29 July 2013 - 02:53 PM in Netduino Plus 2 (and Netduino Plus 1)

Have you looked at the .Net Micro Framework Toolbox?

 

http://netmftoolbox....pported devices




#54703 Button Interrupts

Posted by cce1911 on 15 December 2013 - 04:48 PM in Netduino Plus 2 (and Netduino Plus 1)

CW2, thanks for your response. I made the changes you suggested and still had a problem. Then I realized that I had not tied the 3v button cell ground to the NP2 ground. Once I did that, everything seems to work just fine.

 
 



#54700 Button Interrupts

Posted by cce1911 on 15 December 2013 - 03:32 PM in Netduino Plus 2 (and Netduino Plus 1)

I'm seeing some odd behavior for what should be a simple project. Maybe I'm missing something and someone can point out the error of my ways?

 

What I'm trying to do is capture a sensor input. To test my code I've simulated the sensor with a simple momentary push button. See the schematic attached.

 

The problem is when I push one button, it triggers the interrupt for the other buttons. Here is my code:

public class Program2        {        static DateTime dtLastPress;        static int intBounceWait = 200;        public static void Main()            {            InterruptPort ipT1 = new InterruptPort(Pins.GPIO_PIN_D0, false, Port.ResistorMode.PullDown, Port.InterruptMode.InterruptEdgeLow);            ipT1.OnInterrupt += T_OnInterruptT1;            InterruptPort ipT2 = new InterruptPort(Pins.GPIO_PIN_D1, false, Port.ResistorMode.PullDown, Port.InterruptMode.InterruptEdgeLow);            ipT2.OnInterrupt += T_OnInterruptT2;            InterruptPort ipT3 = new InterruptPort(Pins.GPIO_PIN_D2, false, Port.ResistorMode.PullDown, Port.InterruptMode.InterruptEdgeLow);            ipT3.OnInterrupt += T_OnInterruptT3;            InterruptPort ipT4 = new InterruptPort(Pins.GPIO_PIN_D3, false, Port.ResistorMode.PullDown, Port.InterruptMode.InterruptEdgeLow);            ipT3.OnInterrupt += T_OnInterruptT4;            Thread.Sleep(Timeout.Infinite);            }        static void T_OnInterruptT1(uint data1, uint data2, DateTime time)            {            if (dtLastPress.AddMilliseconds(intBounceWait) > time)  // prevent bounce                {                Debug.Print("T1 = bounce wait");                return; // prevent bounce                }            dtLastPress = time;            RecordPress(1, time);            }        static void T_OnInterruptT2(uint data1, uint data2, DateTime time)            {            if (dtLastPress.AddMilliseconds(intBounceWait) > time)  // prevent bounce                {                Debug.Print("T2 = bounce wait");                return; // prevent bounce                }            dtLastPress = time;            RecordPress(2, time);            }        static void T_OnInterruptT3(uint data1, uint data2, DateTime time)            {            if (dtLastPress.AddMilliseconds(intBounceWait) > time)  // prevent bounce                {                Debug.Print("T3 = bounce wait");                return; // prevent bounce                }            dtLastPress = time;            RecordPress(3, time);            }        static void T_OnInterruptT4(uint data1, uint data2, DateTime time)            {            if (dtLastPress.AddMilliseconds(intBounceWait) > time)  // prevent bounce                {                Debug.Print("T4 = bounce wait");                return; // prevent bounce                }            dtLastPress = time;            RecordPress(4, time);            }        static void RecordPress(int intTarget, DateTime time)            {            Debug.Print("T" + intTarget.ToString() + " = " + DateTime.Now.ToString("MM/dd/yy H:mm:ss.fff"));            }        }

If I run the code and press the buttons in order (T1, T2, T3, T4) I get the following output:

T3 = 06/01/11 0:00:10.259
T4 = bounce wait
T3 = bounce wait
T4 = bounce wait
T2 = bounce wait
T1 = bounce wait
T2 = 06/01/11 0:00:12.705
T3 = 06/01/11 0:00:16.861
T4 = bounce wait
T2 = bounce wait
T1 = bounce wait
 
 
Any insight into what I'm doing wrong would be appreciated.

Attached Thumbnails

  • button_test.jpg



#49087 Compatible SD Shield?

Posted by cce1911 on 06 May 2013 - 02:43 AM in Netduino 2 (and Netduino 1)

I definitely have a conflict with the SPI pins. If I free up D10-D13 I'm 2 pins short of what I need for the project.




#49077 Compatible SD Shield?

Posted by cce1911 on 05 May 2013 - 08:15 PM in Netduino 2 (and Netduino 1)

NooM,

I have the N2 with a 2gb SD card.

 

The reason I say it does not appear to work is because my app works when the I/O is connected to the N2, but when I plug in the SD shield and move all the I/O wires to it, the app will not run. Nowhere does the documentation say it is Netduino compatible, I was assuming it was when I bought it, now I'm trying to confirm this assumption. I have not written any code to read/write to the SD card, yet.

 

You can see my initial schematic here: http://forums.netdui...uttons-and-lcd/

 

I'm not familiar with eeproms, would you point me to some tutorials? I like the sound of cheap:)




#49064 Compatible SD Shield?

Posted by cce1911 on 05 May 2013 - 03:53 PM in Netduino 2 (and Netduino 1)

I purchased a Seedstudio SD shield (http://www.seeedstud...l?cPath=132_134

) but it does not appear to work. Has anyone used this shield with the Netduino?

 

If not, what shield do you suggest?

 

I need to store 18 configuration values (double) from one power up to the next...

-Capel




#52261 Date from netduino plus

Posted by cce1911 on 21 August 2013 - 12:56 PM in Netduino Plus 2 (and Netduino Plus 1)

I used the DS1307 real time clock from Adafruit: http://www.adafruit.com/products/264




#51282 Dive Computer and Rebreather Controller Based on a Netduino Mini

Posted by cce1911 on 10 July 2013 - 02:39 AM in Project Showcase

Wow, that's a heck of an undertaking! So what's the motivation? Are you implementing features not found on the Shearwater or Hammerhead units? (BTW, I'm not a CCR diver but I was tech diving long before the term was ever coined.)




#51277 Dive Computer and Rebreather Controller Based on a Netduino Mini

Posted by cce1911 on 10 July 2013 - 01:16 AM in Project Showcase

I saw you using gradient factors in the video. What deco algorithm are you using and did you code that yourself?




#51284 Dive Computer and Rebreather Controller Based on a Netduino Mini

Posted by cce1911 on 10 July 2013 - 03:21 AM in Project Showcase

What do you use for a HUD?

 

It looks like you have certainly found a creative outlet :) I look forward to following your progress...




#52165 Failed allocation while writing text file

Posted by cce1911 on 14 August 2013 - 08:01 PM in Netduino 2 (and Netduino 1)

Val, thanks for the reply. I've decided to start a new log file at 25k, but I will give Debug.GC a try.

-Capel




#52135 Failed allocation while writing text file

Posted by cce1911 on 14 August 2013 - 01:42 AM in Netduino 2 (and Netduino 1)

In my N+2 app, I log things to a text file for later debugging. I use this code in a function:

using (var filestream = new FileStream(@"SDrunlog.txt",FileMode.Append))                    {                    StreamWriter streamWriter = new StreamWriter(filestream);                    streamWriter.WriteLine(DateTime.Now.ToString("MM/dd/yy H:mm:ss.fff") + ": " + strMsg);                    streamWriter.Close();                    //Debug.Print(DateTime.Now.ToString("MM/dd/yy H:mm:ss.fff") + ": " + strMsg);                    }

When my log file gets over 33k I get a failed allocation error when creating the new streamwriter:

StreamWriter streamWriter = new StreamWriter(filestream);

 

Any idea on what is causing this and how to avoid it?  




#57920 How do I connect Netduino+ to a pc wireless?

Posted by cce1911 on 03 May 2014 - 06:37 PM in Netduino Plus 2 (and Netduino Plus 1)

I got the Edimax 6258n and installed but I'm having some issues.

 

Here is my configuration:

  • Belkin N300 Wireless Router
  • No WAN connectivity
  • DHCP turned off
  • Static IP of 192.168.1.1
  • Netduino +2
  • Setup with static IP of 192.168.1.100
  • Laptop PC
  • connected to Belkin N300 wifi
  • Static IP of 192.168.1.29

 

My PC application uses a socket connection to talk to the Netduino on port 9999 and 9998. This works fine in a hard wired environment.  In this environment, I can ping the IP addresses of all the devices, but when I go to establish a socket connection I get an error saying "No connection can be made because the target machine actively refused it."

 

I tried configuring the Port Forwarding feature of the Edimax, but that did not seem to work either.

 

Does anyone have an idea on how to get the Edimax to allow tcp/ip traffic on designated ports?




#57942 How do I connect Netduino+ to a pc wireless?

Posted by cce1911 on 05 May 2014 - 01:23 AM in Netduino Plus 2 (and Netduino Plus 1)

I got everything working. I just needed to boot the Edimax and wait 60 seconds before powering up the N+2. When powering them up at the same time, the N+2 did not see the Edimax, but if I waited a minute, everything worked as advertised.

 

Baxter, yes I have it setup the way you described and port forwarding was not my issue. 




#57820 How do I connect Netduino+ to a pc wireless?

Posted by cce1911 on 29 April 2014 - 02:03 AM in Netduino Plus 2 (and Netduino Plus 1)

Baxter,

If I could use the USB port, it would make things easier. So I will now go down the path you suggest.

-Capel




#57813 How do I connect Netduino+ to a pc wireless?

Posted by cce1911 on 28 April 2014 - 09:07 PM in Netduino Plus 2 (and Netduino Plus 1)

Could I use a male to male USB cable to power the Edimax BR-6258n NANO via the N+2 if I have a battery providing power to the N+2?




#54235 How to drive multiple lasers?

Posted by cce1911 on 22 November 2013 - 08:06 PM in Netduino Plus 2 (and Netduino Plus 1)

Paul,

Thanks for this very informative post. I was trying to avoid adding 9 components to my system, but based on your observations, that may be unavoidable. Given this, would MOSFETs be a better choice than Darlington pairs?

-Capel




#54229 How to drive multiple lasers?

Posted by cce1911 on 22 November 2013 - 06:07 PM in Netduino Plus 2 (and Netduino Plus 1)

So I have gotten my shift register to work with my N+2, but the lasers I'm trying to drive require 300mA of current each. So to drive 9 of these, I need almost 3A at 2.5 - 4.5 vdc.  This is way too much for the N+2 and the 74HC595. I've been looking at some transistor arrays, but I'm not sure how to wire them. Can anyone point me to a circuit that uses this 8ch Darlington Sink driver (or something similar)?




#49106 How to Write/Read to Built-in Flash/EEPROM on the BARE Netduino?

Posted by cce1911 on 06 May 2013 - 04:51 PM in Visual Studio

It's a feature on our wish list, something that we baked into the hardware design. Right now we're focused on ensuring that all Netduino Plus 2 features work really well for our community and that projects upgrade seamlessly.

After the holidays we'll start attacking new software features. If this one gets the most votes, it gets in the first batch Posted Image

Chris

 

Did this make the list?





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.