- Netduino Forums
- → MattW's Content
MattW's Content
There have been 23 items by MattW (Search limited from 04-June 23)
#1518 Yet another supported shield question (GPS)
Posted by MattW on 30 August 2010 - 02:42 AM in Netduino 2 (and Netduino 1)
#2063 What's needed for GPS
Posted by MattW on 09 September 2010 - 10:35 PM in General Discussion
#4121 What is the Netduino Mini?
Posted by MattW on 22 October 2010 - 08:14 PM in Netduino Mini
#2462 What is need to get started with Netduino?
Posted by MattW on 19 September 2010 - 06:17 AM in General Discussion
#2665 What is need to get started with Netduino?
Posted by MattW on 23 September 2010 - 11:20 AM in General Discussion
Thanks mate!!You can also get the eBook version for US $27.99.
#2646 What is need to get started with Netduino?
Posted by MattW on 23 September 2010 - 04:14 AM in General Discussion
#4847 What happened to Aref and 3V3?
Posted by MattW on 11 November 2010 - 09:49 PM in Netduino Mini
Let us know which one you settle with - I'l be very interested to know.I have another video already shot, it's just that I keep forgetting to upload it.
In the mean time, I am waiting for my 4th GPS in a row. Been very unhappy with the performance of all the modules up to this point.
Thanks and Cheers,
Matt.
#4096 We have a little Netduino surprise to share...
Posted by MattW on 22 October 2010 - 08:57 AM in General Discussion
#2641 Stay close to your computer (or come to MakerFaire)...
Posted by MattW on 23 September 2010 - 03:32 AM in General Discussion
#2708 Stay close to your computer (or come to MakerFaire)...
Posted by MattW on 24 September 2010 - 12:09 AM in General Discussion
#2593 Start coding before getting my Netduino
Posted by MattW on 22 September 2010 - 01:28 AM in Visual Studio
#3004 Simple Netduino Webserver
Posted by MattW on 27 September 2010 - 10:33 AM in Netduino Plus 2 (and Netduino Plus 1)
#4160 I2CBus
Posted by MattW on 24 October 2010 - 07:42 AM in Project Showcase
#4354 How to utilize full range of Analog Input
Posted by MattW on 29 October 2010 - 08:44 PM in General Discussion
#2869 Friends I need to get some basic knowledge
Posted by MattW on 25 September 2010 - 11:17 AM in General Discussion
Regading your question about the number LED, yes you can!
Here's one I hooked up. For more info, see CIRC-05 in the Sparkfun Anduino tutorial. Links to that tutorial in my post in the topic Eric Burdo refers to...
After I wired up the LED's and got it working, I hooked up the number LED..
... and here's the code! There's 3 examples on playing with the shift register.
using System; using System.Threading; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; using SecretLabs.NETMF.Hardware; using SecretLabs.NETMF.Hardware.Netduino; namespace Sparkfun___project_15 { public class Program { /// <summary> /// This is an example program in the use of Shift Registers /// and the digit display /// </summary> public static void Main() { OutputPort LatchPort, ClockPort, DataPort; // this is how I wired it, doesn't really matter, // as long as your code here matches your wiring LatchPort = new OutputPort(Pins.GPIO_PIN_D8,false); ClockPort = new OutputPort(Pins.GPIO_PIN_D12, false); DataPort = new OutputPort(Pins.GPIO_PIN_D11, false); while (true) { /* // Example 1: Up and down each number to the // power of 2 (light test/Knight Rider if you're // not using the digit display but seperate leds!) if(t >= 7 && direction == 1) direction = -1; if(t <= 0 && direction == -1) direction = 1; t+= direction; LatchPort.Write(false); ShiftOut((int)System.Math.Pow(2, t), ClockPort, DataPort); LatchPort.Write(true); // Compare which light goes on to match the associated number.. // this can be useful in figuring out the diagram in the 3rd example. // ie matching which light matches which number Debug.Print(System.Math.Pow(2, t).ToString()); Thread.Sleep(3000); */ /* // Example 2: Cover every combination (Just for the fun of it)... for (byte i = 0; i <= 255; i++) { LatchPort.Write(false); ShiftOut(i, ClockPort, DataPort); LatchPort.Write(true); Thread.Sleep(20); } * */ /* // * Example 3: Count 0 - 9 and . representations, based on my wiring. * * The numbers in the below diagram can also be figured out * using the Example 1 code... * * 32 * ___ * 64 | | 16 * --- <--128 * 8 | | 2 * ___ . 1 * 4 */ // Do the math and make it "look" simple //byte[] Numbers = {126, 18, 188, 182, 210, 230, 238, 50, 254, 242 }; // Or add each light to turn on. Easier to follow... byte[] Numbers = { 32 + 64 + 16 + 8 + 2 + 4, // Digit 0 = 126 2+16, // Digit 1 = 18, etc 32+16+128+8+4, // Digit 2 32+16+128+2+4, // Digit 3 64+16+128+2, // Digit 4 32+64+128+2+4, // Digit 5 64+8+4+2+128, // Digit 6 32+16+2, // Digit 7 32+16+64+128+8+2+4, //Digit 8 32+16+64+128+2 // Digit 9 }; for (int iCurrentNumber = 0; iCurrentNumber <= 9; iCurrentNumber++) { LatchPort.Write(false); ShiftOut(Numbers[iCurrentNumber], ClockPort, DataPort); LatchPort.Write(true); Thread.Sleep(100); } // make the dot blink a few times.... for (int iCurrentNumber = 0; iCurrentNumber <= 9; iCurrentNumber++) { LatchPort.Write(false); ShiftOut(1, ClockPort, DataPort); LatchPort.Write(true); Thread.Sleep(50); LatchPort.Write(false); ShiftOut(0, ClockPort, DataPort); LatchPort.Write(true); Thread.Sleep(100); } } } private static void ShiftOut(int DataOut, OutputPort ClockPort, OutputPort DataPort) { // clear shift register read for sending data DataPort.Write(false); ClockPort.Write(false); // For each bit in dataout, send out a bit for (byte i = 0; i <= 7; i++) { // set clickpin to low prior to sending bit ClockPort.Write(false); DataPort.Write((DataOut & (1 << i)) != 0); ClockPort.Write(true); } ClockPort.Write(false); } } }
#3205 Console Output??
Posted by MattW on 29 September 2010 - 08:18 PM in General Discussion
#2300 Calculate processor usage
Posted by MattW on 14 September 2010 - 07:02 PM in General Discussion
Good question. You would think a while(true) loop would mean 100% CPU utilitzation and therefore higher power usage. Is that the case?[snip!]
I was wondering if there is a way to see how busy the CPU is. In the normal world, if you wrote a programme that had While(true){} and waited inside it for an event, you'd be shot (in most cases).
[/snip!]
#4481 Basic Tutorials
Posted by MattW on 05 November 2010 - 01:50 PM in Netduino 2 (and Netduino 1)
#4474 Basic Tutorials
Posted by MattW on 05 November 2010 - 12:32 PM in Netduino 2 (and Netduino 1)
#3522 Audio->Analog input question
Posted by MattW on 05 October 2010 - 10:19 AM in General Discussion
#1908 Arduino or Netduino
Posted by MattW on 08 September 2010 - 02:26 AM in General Discussion
#3499 AnalogInput read problems
Posted by MattW on 04 October 2010 - 10:06 PM in Netduino 2 (and Netduino 1)
#2618 $10 GPS receiver?!
Posted by MattW on 22 September 2010 - 07:38 PM in General Discussion
- Netduino Forums
- → MattW's Content
- Privacy Policy