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.
We snuck a GoBus 2.0 feature into the latest firmware...
Dear friends,
We snuck one of the really cool new features of GoBus 2.0 into the latest Netduino Go firmware.
In summary, Netduino Go now maps traditional Netduino projects' I/O to the Shield Base automatically.
What does this mean?
Let's take the classic "blinky" sample for instance. If you run the following code on your freshly-updated Netduino Go (using updated ShieldBase firmware and driver dll), it will actually blink the blue LED mapped to the Shield Base's GoPort.
NetduinoGo.ShieldBase shieldBase = new NetduinoGo.ShieldBase((GoBus.GoSocket)5);OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);while (true){ led.Write(!led.Read()); Thread.Sleep(100);}
Note that we used Pins.ONBOARD_LED and not shieldBase.Pins.ONBOARD_LED. GoBus automatically mapped the standard Pins collection to the first Shield Base it knew about.
This is made possible by the new standardized Netduino HardwareProvider which is also used on Netduino and Netduino Plus 2. Basically, any time you try to use a Pin or AnalogChannel or PwmChannel of a Netduino--but deploy the code to a Netduino Go instead--you'll get the corresponding I/O feature on your Shield Base!
This also extends to SPI channels (when using the SPI_Devices collection). We will be extending this to also auto-map SerialPorts in a future release...but for now use the shieldBase.SerialPorts collection for serial ports.
Finally, you don't technically need to create a ShieldBase object. For now, if you want to play with this feature, I highly recommend creating one (as done above) to specify the Shield Base's physical connection. But if you leave that line out...your Netduino Go will automatically find the Shield Base. It is using the GoBus UART transport--so the auto-detect is about 100 times slower than it will be with GoBus 2.0 (5-10 seconds instead of 50-100 milliseconds), but the architecture is now baked in.
OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);while (true){ led.Write(!led.Read()); Thread.Sleep(100);}
Of course, the I/O auto-mapping works with all the analog and digital pins on Shield Base. So Pins.GPIO_PIN_D5, PwmChannels.PWM_PINS_D9, etc. all map automatically and seamlessly. You can even use the recently-updated legacy SecretLabs AnalogInput and PWM classes with auto-mapped virtual I/O.
With the newest Netduino Go firmware, the new USB name is now simply "Netduino" instead of "NetduinoGo". As we go forward, this will enable you to simply deploy existing Netduino applications (including Netduino Plus/Plus 2 apps) to your Netduino Go unchanged. Then you can simply add GoBus modules to the project, to take advantage of the best of both worlds.
Enjoy, and thank you for all your feedback.
Chris
Dear friends,
We snuck one of the really cool new features of GoBus 2.0 into the latest Netduino Go firmware.
In summary, Netduino Go now maps traditional Netduino projects' I/O to the Shield Base automatically.
What does this mean?
Let's take the classic "blinky" sample for instance. If you run the following code on your freshly-updated Netduino Go (using updated ShieldBase firmware and driver dll), it will actually blink the blue LED mapped to the Shield Base's GoPort.
NetduinoGo.ShieldBase shieldBase = new NetduinoGo.ShieldBase((GoBus.GoSocket)5);OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);while (true){ led.Write(!led.Read()); Thread.Sleep(100);}
Note that we used Pins.ONBOARD_LED and not shieldBase.Pins.ONBOARD_LED. GoBus automatically mapped the standard Pins collection to the first Shield Base it knew about.
This is made possible by the new standardized Netduino HardwareProvider which is also used on Netduino and Netduino Plus 2. Basically, any time you try to use a Pin or AnalogChannel or PwmChannel of a Netduino--but deploy the code to a Netduino Go instead--you'll get the corresponding I/O feature on your Shield Base!
This also extends to SPI channels (when using the SPI_Devices collection). We will be extending this to also auto-map SerialPorts in a future release...but for now use the shieldBase.SerialPorts collection for serial ports.
Finally, you don't technically need to create a ShieldBase object. For now, if you want to play with this feature, I highly recommend creating one (as done above) to specify the Shield Base's physical connection. But if you leave that line out...your Netduino Go will automatically find the Shield Base. It is using the GoBus UART transport--so the auto-detect is about 100 times slower than it will be with GoBus 2.0 (5-10 seconds instead of 50-100 milliseconds), but the architecture is now baked in.
OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);while (true){ led.Write(!led.Read()); Thread.Sleep(100);}
Of course, the I/O auto-mapping works with all the analog and digital pins on Shield Base. So Pins.GPIO_PIN_D5, PwmChannels.PWM_PINS_D9, etc. all map automatically and seamlessly. You can even use the recently-updated legacy SecretLabs AnalogInput and PWM classes with auto-mapped virtual I/O.
With the newest Netduino Go firmware, the new USB name is now simply "Netduino" instead of "NetduinoGo". As we go forward, this will enable you to simply deploy existing Netduino applications (including Netduino Plus/Plus 2 apps) to your Netduino Go unchanged. Then you can simply add GoBus modules to the project, to take advantage of the best of both worlds.
Enjoy, and thank you for all your feedback.
Chris
How will this work after the ShieldBase beta, when I might have 8 ShieldBases connected? Will it always choose the first one, or will I get an AmbiguousReferenceException?
I suspect that I'll have to be explicit and select which SB I want the use my Pin on.
How will this work after the ShieldBase beta, when I might have 8 ShieldBases connected? Will it always choose the first one, or will I get an AmbiguousReferenceException?
I suspect that I'll have to be explicit and select which SB I want the use my Pin on.
Great question. It will use the first Shield Base it knows about. If you've already instantiated one in code, it will use the first one you instantiated. If you have not instantiated any, it will search the bus until it finds one.
The goal is to make simple projects work exactly the same on "Netduino Go + Shield Base" as they would on the other Netduinos. Full code compatibility is the direction we're heading.
If you want to use multiple Shield Bases once the Shield Base firmware goes gold, you can address all of their I/O features using the ShieldBase.Pins, ShieldBase.AnalogChannels, etc. collections.
Chris
what references did you need to change to get this working? i added the new sheildbase.dll and i dont see the ONBOARD_LED.
If you replace the SecretLabs.NETMF.Hardware.NetduinoGo.dll assembly with the standard SecretLabs.NETMF.Hardware.Netduino.dll assembly, they'll show up.
The 4.2.2 SDK comes with an updated NetduinoGo assembly which contains these as well.
Chris
I just bought a boatload of Netduino go stuff, but it's go us 1.5. Does go us 2.0 require different hardware?Thanks and pardon my ignorance on this topic.Gerry
I just bought a boatload of Netduino go stuff, but it's go us 1.5. Does go us 2.0 require different hardware? Thanks and pardon my ignorance on this topic. Gerry
Hi Gerald and welcome to the community!
Everything will be forwards and backwards compatible so no need to worry
What did you get and what projects are you planning with your new Netduino Go?
I just bought a boatload of Netduino go stuff, but it's go us 1.5. Does go us 2.0 require different hardware? Thanks and pardon my ignorance on this topic. Gerry
As Gutworks mentioned, Netduino Go will get a firmware update to work with GoBus 2.0 devices (hubs, the new auto-map Shield Base I/O, etc.).
Chris
I agonized for weeks over whether to get the Plus 2 or the GO. I ended up going with the GO hoping that I could eventually buy an ethernet module and SD module for it. I already got the Power module from NWazet. To be honest, I came an inch away from buying them both, but because I don't understand everything yet, it wasn't clear how to interface the Plus 2 with a GoBus. Perhaps you guys could make a GoBus adapter for the Plus 2? Probably best not to suggest stuff like that without understanding how stuff works. Anyhow, I do think I've figured out the GoBus now and it's brilliant. I looked at the .NET Gadgeteer hydra and spider, and they had a lot of bus ports, but i finally realized they were dedicated to only a single or very few protocols each. The GoBus is great because every port supports every protocol. It's also great that it works out of the box with a lot of gadgeteer modules.So nice work. I hope to make my own GO Module someday. Perhaps something simple like a 10 or 20 segment led strip.
I bought the following:
Netduino Go! Starter Kit
Nwazet Touch Display
Nwazet Power Module
Nwazet acrylic mounting board
Komodex 7 segment display
Several 20 segment led displays
MAX7219CNG LED driver
As for projects, I don't have anything specific planned yet. I'm just trying to get an understanding of what's possible, how things work, and well, have some fun tinkering.
I've heard some people bemoan the lack of in-box documentation. Is there a single place online where I can go to figure out how to get started? I know the .NET framework very well, but is there .NET MF book or something that's publicly available? I already bought the Getting Started with Netduino book and it was helpful, but brief.
Anyhow, really excited to be part of such a vibrant community of Makers!
Now when did you say multiple shield bases can be used?
Maybe a bit of 1-wire too?
In terms of addressing them if you had say 8, would you instantiate them individually addressing each one by a Go! port in order to control them individually?
Also any plans for doing discount packs of shield bases?
Any news on any data storage for Go! and maybe a wifi module?
I had another thought the other day, how cool would a usb to go! bus adapter be so you could plug in standard Netduino's or Netduino Plus 1 or 2? I guess it would be possible right as you have an extra UART on the USB? Plus this would mean you could benefit from all the network and data stuff on the plus? Perhaps even write some firmware for the plus that could make it act a bit like a shield base?
Hi Andy,
Lots of good ideas there We have more GoBus suprises later this year, so I'm pretty sure we can make at least some of those come true.
Also...yes, there are discounts available on Shield Bases. 10% off 10-99, 20% off 100+ at Amazon. And one of our other big resellers will be stocking Shield Bases (with available discounts) soon as well.
If you're addressing multiple shield bases (once Shield Base comes out of beta), you simply create an object for each one...and then reference their I/Os through that object. GoBus 2.0 is going to let you put them on hubs too.
Chris