tim c's Content - Netduino Forums
   
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.

tim c's Content

There have been 29 items by tim c (Search limited from 29-March 23)


By content type

See this member's


Sort by                Order  

#51254 Using PWM with NetduinoPlus2

Posted by tim c on 09 July 2013 - 01:32 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi 

Now I have a new question. 

 

Servo works well with your code Tim, if I conect Yellow to I/O pin 5 and Black to NP2 Ground and Red to Np2 +5v.

 

But if I conect  to  external power the servo, it does not work. Red to external + 6v and Black to external " - ".

I have also tried, Red external +6v and Black external " - " plus I have linked the external " - " to the NP2 Ground so as to use a common " - ".  Still does not work.

 

What could be the problem.?  :)

 

My servo is a HS-5645MG .

This thread might help.

 

http://forum.arduino...?topic=117673.0

 

I have not hooked up a server to external power alone. I have always used this: http://www.adafruit.com/products/815




#51020 RGB Led using PWM

Posted by tim c on 02 July 2013 - 02:39 PM in Netduino 2 (and Netduino 1)

There was a naming change between 4.1 and 4.2 and Netduino/N2/N+/N+2. Try the sample in this forum post and see if it works for you:

 

http://forums.netdui...led-pwm-sample/

 

http://forums.netdui...-netduinoplus2/

 

IIRC the change had to do with how you address the PINS.

 

led_r = new PWM([color=rgb(255,0,0);]PWMChannels.PWM_PIN_D9[/color], 100u, 0u, PWM.ScaleFactor.Microseconds, true);

 

Tim




#50613 Using PWM with NetduinoPlus2

Posted by tim c on 18 June 2013 - 03:16 PM in Netduino Plus 2 (and Netduino Plus 1)

Thank you very much Tim for your reply. That is quite a bit of code to go through. just to verify are you using the N+2 with the 4.3 firmware? According to what i found in my research the coding is a little different with PWM for that board and firmware update. When ive figured out your coding you supplied ill update you if i've figured it out. Thank you again.

 

If you look at the sample NetduinoPWMLED4.2 it tells you how to hook up a simple LED to D10 and GND and uses PWM to cycle the LED brightness. I loaded the project and then changed it to .NET MF 4.3 and it ran fine on my N+2 with 4.3 loaded.




#50547 Using PWM with NetduinoPlus2

Posted by tim c on 17 June 2013 - 01:42 PM in Netduino Plus 2 (and Netduino Plus 1)

See if this works for you: http://sdrv.ms/1al9Ph1

 

NetduinoPWM4.2.zip

 




#49920 Looking for a few ninja code contributors...

Posted by tim c on 24 May 2013 - 01:19 PM in General Discussion

You guys are amazing. I'm setting up a repo in BitBucket but have a question: Do you prefer Mercurial or Git? We've moved to Git for all of our new repros--but the tools for Mercurial are so much nicer. Is everyone okay with Git? If not, we can use Mercurial. Also...please post or PM me your BitBucket username so I can explicitly add you to the repo permissions. This is shaping up to be an awesome tool! Chris

Any update on this and SCC?




#49196 Adafruit NFC shield

Posted by tim c on 07 May 2013 - 08:46 PM in Netduino 2 (and Netduino 1)

gomore11,

 

If I can get the N+2 board and the NFC card working I may be able to help.  I have a WP8 (Nokia) so I also want the recognition and data transfer to work.

 

Mark

If you are using a N+2 board and a shield designed for a arduino or Netduino don't you have to jumper the I2C pins from the N+2 dedicated pins to the ones used by the shield (analog pins 4-5: I2C SDA, SCL)?




#48559 So far dissapointed

Posted by tim c on 19 April 2013 - 12:13 PM in Netduino Plus 2 (and Netduino Plus 1)

I had a few similar issues and even had to reinstall the firmware when I somehow locked up the device.

 

If you reboot both your PC and the Netduino and still see the error I suggest checking out these 2 posts on how to load the firmware:

 

http://forums.netdui...-v422-update-2/

 

http://forums.netdui...vs2012-support/




#47808 Looking for a few ninja code contributors...

Posted by tim c on 30 March 2013 - 06:31 PM in General Discussion

I prefer Git since support for it is getting baked into VS2012: http://visualstudiog...5e-d6724bdb980c

 

 

You guys are amazing.

I'm setting up a repo in BitBucket but have a question:

Do you prefer Mercurial or Git? We've moved to Git for all of our new repros--but the tools for Mercurial are so much nicer.

Is everyone okay with Git? If not, we can use Mercurial.

Also...please post or PM me your BitBucket username so I can explicitly add you to the repo permissions.

This is shaping up to be an awesome tool!

Chris




#47516 Looking for a few ninja code contributors...

Posted by tim c on 23 March 2013 - 10:55 PM in General Discussion

[font="tahoma, geneva, sans-serif;"][color=rgb(0,0,0);]Ok I have it compiling and working as x86 (32bit) and x64(64bit) against the proper ST dll's via this addition to the NetDFULib.csproj[/color][/font]

 

<ItemGroup Condition="$(Platform) == 'x64'">

  <Content Include="x64DLL*.dll">

  <Link>%(Filename)%(Extension)</Link>

  <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

  </Content>

</ItemGroup>

<ItemGroup Condition="$(Platform) == 'x86'">

  <Content Include="x86DLL*.dll">

  <Link>%(Filename)%(Extension)</Link>

  <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

  </Content>

</ItemGroup>

 

[font="tahoma, geneva, sans-serif;"][color=rgb(0,0,0);]I have it upgraded to VS2012 but it should still work in VS 2010. I have used NuGet to add in log4net and Command Line Parser Library to the command line project.  Take a look at those links and then you should understand what they add. Use project properties -> debug to set the command line options for debugging. [/color][/font]

 

[font="tahoma, geneva, sans-serif;"][color=rgb(0,0,0);] [/color][/font]

[font="tahoma, geneva, sans-serif;"][color=rgb(0,0,0);]So far the command line options are:[/color][/font]

[font="tahoma, geneva, sans-serif;"][color=rgb(0,0,0);] [/color][/font]

[font="tahoma, geneva, sans-serif;"][color=rgb(0,0,0);]-f, --dfufile (Default: ) DFU Input file to be processed.[/color][/font]

[font="tahoma, geneva, sans-serif;"][color=rgb(0,0,0);]-e, --Erase Firmware (Default: False) Erase the current Firmware[/color][/font]

[font="tahoma, geneva, sans-serif;"][color=rgb(0,0,0);]-d, --Erase Deployment (Default: False) Erase the current Deployment[/color][/font]

[font="tahoma, geneva, sans-serif;"][color=rgb(0,0,0);]-o, --Verbose Output (Default: True) Prints all messages to standard output.[/color][/font]

[font="tahoma, geneva, sans-serif;"][color=rgb(0,0,0);]-v, --VID (Default: 1155) Vendor ID[/color][/font]

[font="tahoma, geneva, sans-serif;"][color=rgb(0,0,0);]-p, --PID (Default: 57105) Product ID[/color][/font]

[font="tahoma, geneva, sans-serif;"][color=rgb(0,0,0);]-s, --Silent nothing (Default: False) Nothing is output but everything is still logged is displayed (Overrides Verbose Output) [/color][/font]

[font="tahoma, geneva, sans-serif;"][color=rgb(0,0,0);]-l, --logfile (Default: ) Full path to Logfile to use for logging[/color][/font]

[font="tahoma, geneva, sans-serif;"][color=rgb(0,0,0);]--help Display this help screen.[/color][/font]

 

Not all of them are working but if you give it a -f pointed to a DFU and have a device hooked up in DFU mode it will erase and load it. Of course they may not be the final command line items - they are just what I thought of today :)

 

More to come later.

 

Tim

 

Updated with latest code to not error if no app.config or log4net settings. I will upload the full code with the packages forlder if I can get more space on the forums - in the meantime you can get it here: http://sdrv.ms/YwzSN1

Attached Files




#47505 Looking for a few ninja code contributors...

Posted by tim c on 23 March 2013 - 03:04 PM in General Discussion

Working on getting it running in x86 and x64 as well as a CLI ..........




#47443 Looking for a few ninja code contributors...

Posted by tim c on 21 March 2013 - 02:06 PM in General Discussion

Is the latest code available? I have some time to work on this and a CLI.




#46985 LCD AdaFruit Backpack

Posted by tim c on 10 March 2013 - 07:44 PM in Netduino Plus 2 (and Netduino Plus 1)

No, I only ran the tests for 10 minutes each and saw no corruption. I did leave the last test running and 11 hours later it was still working great.

 

Tim

 

NP2 on firmware 4.2.2 SDK 4.2.2. Tim are you implying after 10 minutes you get corruption? No I do not have a logic analyzer.




#46940 LCD AdaFruit Backpack

Posted by tim c on 09 March 2013 - 04:25 PM in Netduino Plus 2 (and Netduino Plus 1)

I am running the code I posted using my N2+ (upgraded to MF 4.3) and it is working without display corruption  for 10 minutes with 4 tests  - 2 at 100Mhz and then the same 2 at 400Mhz:

 

 

1)

 

        public static void Main()        {            _bus = new I2CBus();            initializeLCD(_bus);            NetworkInterface networkInterface = NetworkInterface.GetAllNetworkInterfaces()[0];            TimeSpan ts;            DateTime startedDate = DateTime.Now;            short i = 1;            while (true)            {                ts = DateTime.Now.Subtract(startedDate);                String s = "Days: " + ts.ToString();                Debug.Print(s);                LCD.Print(Lcd.Position.ROW_1, Lcd.Position.COLUMN_1, Lcd.FillRow("abcdefghijklmnopqrst"));                LCD.Print(Lcd.Position.ROW_2, Lcd.Position.COLUMN_1, Lcd.FillRow("01234567890123456789"));                LCD.Print(Lcd.Position.ROW_3, Lcd.Position.COLUMN_1, Lcd.FillRow("ABCDEFGHIJKLMNOPQRST"));                LCD.Print(Lcd.Position.ROW_4, Lcd.Position.COLUMN_1, Lcd.FillRow("01234567890123456789"));                switch (i)                {                    case 1:                        LCD.Print(Lcd.Position.ROW_1, Lcd.Position.COLUMN_1, Lcd.FillRow(s));                        i++;                        break;                    case 2:                        LCD.Print(Lcd.Position.ROW_2, Lcd.Position.COLUMN_1, Lcd.FillRow(s));                        i++;                        break;                    case 3:                        LCD.Print(Lcd.Position.ROW_3, Lcd.Position.COLUMN_1, Lcd.FillRow(s));                        i++;                        break;                    case 4:                        LCD.Print(Lcd.Position.ROW_4, Lcd.Position.COLUMN_1, Lcd.FillRow(s));                        i = 1;                        break;                }                Thread.Sleep(5000);            }        }

 

2)

 

 

        public static void Main()        {            _bus = new I2CBus();            initializeLCD(_bus);            NetworkInterface networkInterface = NetworkInterface.GetAllNetworkInterfaces()[0];            TimeSpan ts;            DateTime startedDate = DateTime.Now;            LCD.Print(Lcd.Position.ROW_1, Lcd.Position.COLUMN_1, Lcd.FillRow("abcdefghijklmnopqrst"));            LCD.Print(Lcd.Position.ROW_2, Lcd.Position.COLUMN_1, Lcd.FillRow("01234567890123456789"));            LCD.Print(Lcd.Position.ROW_3, Lcd.Position.COLUMN_1, Lcd.FillRow("ABCDEFGHIJKLMNOPQRST"));            LCD.Print(Lcd.Position.ROW_4, Lcd.Position.COLUMN_1, Lcd.FillRow("01234567890123456789"));            while (true)            {                ts = DateTime.Now.Subtract(startedDate);                String s = "Days: " + ts.ToString();                Debug.Print(s);                LCD.Print(Lcd.Position.ROW_4, Lcd.Position.COLUMN_1, Lcd.FillRow(s));                Thread.Sleep(1000);            }        }

 

 

If you are sure the wiring and soldering is correct and good then maybe check the power? Do you have a Logic Analyzer to see what is on the I2C lines before and after the corruption? What firmware and .NETMF version are you using? There were some bugs with I2C in some firmware releases.

 

Can you post a code sample/project and the exact device and SDK/Firmware versions you are using?




#46911 Looking for a few ninja code contributors...

Posted by tim c on 08 March 2013 - 07:48 PM in General Discussion

I see a DLL that can be used by both a console app and a gui app. Do we need a GIT repository setup?




#46773 Need help with network settings on N+2

Posted by tim c on 06 March 2013 - 05:50 PM in Netduino Plus 2 (and Netduino Plus 1)

If you want to stay on 192.168.x.x for the netduino subnet you can use these settings:

 

PC

IP: 192.168.1.10

SNM: 255.255.255.0

GW: 192.168.1.1

 

N+2

IP: 192.168.1.20

SNM: 255.255.255.0

GW: 192.168.1.1

 

Notice the third one (octet) is a 1 and not a 0. the Zero subnet is for your pc/internet network.

 

The reason you can not use 192.168.0.x is that your PC already has a network with that Subnet and, while it can be done with static routes, it can be very difficult to set it all up correctly. Try this at a command prompt "Route Print" :)

 

HTH,

Tim

Tim, your suggested settings worked fine. (Window's wouldn't let me set the default gateway to 0.0.0.0, so I made the N+2's gateway be the PC's static IP, and vice versa.) I think this'll be okay since I didn't have to change the settings to my wireless network--I just changed settings for Local Area Connection and left the wireless alone. I rarely, if ever, use a wired connection on the laptop, so that should work out fine. I also tried unplugging the Ethernet cable, restarting the computer, and plugging the cable back in to see if Windows would remember my new settings or return to default. Thankfully, it remembered the new settings.

 

Thanks for the help, guys!




#46758 Need help with network settings on N+2

Posted by tim c on 06 March 2013 - 02:03 PM in Netduino Plus 2 (and Netduino Plus 1)

I would recommend using completely different IP settings for this mini network. You are basically setting up a second network that is isolated from any other. It is just between the PC and device. Try using these:

 

PC

IP: 10.1.1.10 

SNM: 255.255.255.0

GW: 0.0.0.0

 

N+2

IP: 10.1.1.20 

SNM: 255.255.255.0

GW: 0.0.0.0

 

From what I recall you won't need a gateway since you can't leave the local segment.

 

Tim

I didn't try pinging it, but I did hook the Netduino up directly to the router and both programs worked. (See my last post on this thread.)

 

Now I'm trying to get the PC and the Netduino to talk to each other without the router in the middle. First, is this even possible, or do I need a router to direct the traffic? I would think that, given the correct settings and connection, they should be able to send simple packets back and forth. But as I said earlier, I have little to no experience with TCP. If it's not possible, do you have a recommendation on which protocol I should try instead?

 

I did get a crossover cable and connected the two directly, but haven't been able to make it work. I basically kept all the settings the same, except changed the default gateway from the router's IP to the PC's.

 

Thoughts?




#46595 Looking for a few ninja code contributors...

Posted by tim c on 03 March 2013 - 10:46 PM in General Discussion

Chris - What would the basic features be for version 1?




#43936 4X20 LCD display with I2C Interface

Posted by tim c on 22 January 2013 - 02:53 PM in Project Showcase

Attached is a sample I just ran on my NP2 with these:

 

https://www.adafruit.com/products/292

https://www.adafruit.com/products/198

 

Connect:

• DAT (SDA) to I2C Data (SD)
• CLK (SCL) to I2C Clock (SC)
• 5V to 5V
• GND to GND

 

NOTE: I did not create the libraries used - I just got everything working on my NP2 - credit and thanks go to those who created the libraries and put in all the hard work making original code for these devices.

Attached Files




#43933 Netduino Plus 2 and LCD 20x4

Posted by tim c on 22 January 2013 - 01:49 PM in Netduino Plus 2 (and Netduino Plus 1)

Sounds like I have it wired correctly.

 

Keep getting errors when starting:

 

A first chance exception of type 'System.IO.IOException' occurred in MicroLiquidCrystal.dll

What using statements do you have and what is in your references?

 

Also, I have found it best to NOT use a compiled DLL, but instead to use the source and include it as part of my solution. That way the DLL gets compiled for MY specific project. So, maybe try using the source for  MicroLiquidCrystal.dll instead of referencing it directly.




#43660 Netduino Plus 2 and LCD 20x4

Posted by tim c on 18 January 2013 - 02:24 PM in Netduino Plus 2 (and Netduino Plus 1)

Are you connecting directly to the LCD or using something in between? I have these working on a N+2: 
 
https://www.adafruit.com/products/292
https://www.adafruit.com/products/198
 
I2C to a 20x4 LCD and it works great.

 

I think it is the same LCD. I will be posting a code sample this weekend and will up date you as to were you can find it.

 

Also - if you are using I2C as your hookup diagram shows you need to go into the N+2 ports SC and SD. 




#43657 4X20 LCD display with I2C Interface

Posted by tim c on 18 January 2013 - 02:18 PM in Project Showcase

I was out of town on work - I'll try and put it together this weekend.

 

Tim




#43134 SerialPort's BytesToRead property doesn't work correctly?

Posted by tim c on 10 January 2013 - 11:35 PM in Netduino Plus 2 (and Netduino Plus 1)

It may be that the DataReceived event is firing before all the data has completed sending/receiving. In that case you need to wait for it to fire again to get some more of the data and combine them.




#42885 4X20 LCD display with I2C Interface

Posted by tim c on 06 January 2013 - 08:21 PM in Project Showcase

Keeping an eye on this would like a reliable i2c LCD

I have these working just fine on a N+2:

 

https://www.adafruit.com/products/292

https://www.adafruit.com/products/198

 

I2C to a 20x4 LCD and it works great.

 

Here is a video of it working on my BoxCar:

 

http://sdrv.ms/UwMKxE

 

LMK if you want a code sample.




#41951 Netduino Plus 2 problems (InterruptPort & I2C)

Posted by tim c on 20 December 2012 - 03:57 PM in Netduino Plus 2 (and Netduino Plus 1)


Do you have any pointers on the reliability of the i2c communication?

[Edit: grammar]


Please make sure you have the latest firmware: http://forums.netdui...-v421-update-2/

From what I understand it fixes a lot of I²C issues.

Tim



#41604 The robot overlord (BOXCAR) is coming together

Posted by tim c on 15 December 2012 - 10:35 PM in Netduino Plus 2 (and Netduino Plus 1)

Some parts came in from adafruit 2 days ago. I now have all of this working together:

1 LCD over I2C
1 Sonic Distance sensor (digital d6,d7)
2 Continuious Servos (wheels) (I2C)
1 Micro Server (steering) (I2C) Not yet hooked to steer
On Board Ethernet

All integrated into my N2+


I am using these:

http://www.netduino....plus2/specs.htm
http://www.amazon.co...ils_o00_s00_i00
http://www.amazon.co...ils_o00_s02_i01
https://www.adafruit.com/products/815
https://www.adafruit.com/products/292
https://www.adafruit.com/products/198
https://www.adafruit.com/products/154
https://www.adafruit.com/products/167
https://www.adafruit.com/products/276
https://www.adafruit.com/products/368

I am very happy with everything from ADAFRUIT!!!

Attached is a picture of the prototype - BOXCAR (it's in a box B) )

I have also attached the source code. There is lots of pieces fom all over in there and the code needs lots of work - but it is a proof of concept right now.

There are more pictures and a video at my skydrive.

Let me know if you have any questions.

I'll post updates as it comes along. My son wants to add a camera and a wifi module so we can connect to the car and "see".

Attached Thumbnails

  • S1010015a.JPG

Attached Files





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.