Friends I need to get some basic knowledge
#1
Posted 24 September 2010 - 06:24 PM
I am new to this netduino(Micro framework). I need help friends.
Today only I visited http://www.netduino.com/, I saw sample video this is really cool. I like to develop some small thing.
1) For this What are the things we need?
2) Can we run the programs in Emulator or we need to buy the hardware? Because first I want to play with it.
3) One thing I would like to ask is, I want to show Number using Number LED. is it possible that in that hardware.
Please friends help me to know in detail. I am looking for your feedback.
Enjoy while coding..!
Thanks,
Naga Harish.
#2
Posted 24 September 2010 - 07:31 PM
Today LED's, tomorrow, the world!!! Well, OK, maybe servos.
#3
Posted 25 September 2010 - 09:55 AM
#4
Posted 25 September 2010 - 10:57 AM
Hi Naga,
I'm currentley working on the emulator with a few colleges. At the moment you can run some basic programs on the emulator. As with just updated the software archetecture. We currentley only support one push button, toggle switch and one LED as an output. While I do undetstand this is limeted more will be available when we sort out moveing the devices around the work space.
The new version is availavle here : http://netduinoemula...ist/changesets#
You will get more files than you need but if you work with the Netduino Emulator V1.275 folder that is the most up to date.
If you want to play with a bit more the older version is available: http://netduinoemula...wnloadId=147473
This has buttons/toggle switchs and LED/DC motors to play with.
It currentley support Digital Inputs/Outputs only as we need to intergrate analgue set up with Microsoft .Net Framework which were a little stuck with same with PWM.
While limeted it does however show the basics and demonstartes how easy it really is to use Netduino.
Cheers
Chris
NetduinoEmulator Team
Thanks for your reply!
First I will work on emulator, but I really like this.
Hardware for software people!
#5
Posted 25 September 2010 - 11:17 AM
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...
P1040915.jpg 208.54KB 34 downloads
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); } } }
#6
Posted 25 September 2010 - 11:38 AM
3) One thing I would like to ask is, I want to show Number using Number LED. is it possible that in that hardware.
For grins and giggles... anyone have code/breadboard plans to run a 7 segment number display w/out using a shift register?
Today LED's, tomorrow, the world!!! Well, OK, maybe servos.
#7
Posted 25 September 2010 - 02:46 PM
Well saidHardware for software people!
#8
Posted 25 September 2010 - 03:23 PM
For grins and giggles... anyone have code/breadboard plans to run a 7 segment number display w/out using a shift register?
I cobbled together something from some of the arduino tutorials, and some help from Google.
I'll write it all up and post it later this weekend.
Today LED's, tomorrow, the world!!! Well, OK, maybe servos.
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users