Programming Netduino Go
#1
Posted 06 April 2012 - 12:45 AM
1. Do you need to declare the modules? i.e. If I want to use an analog pin on the Shield Base Module.
2. Are there any code sample available?
3. I assume that it will arrive with .net framework 4.2 loaded, are there additional files that need to be downloaded?
4. Do you plan on keeping a pinned message on module sources and supplies (cables etc.)
I am sure that tommorow night I will have additional questions but will wait until then, hopefully this topic will generate additional questions and answers.
Oh by the way the whole concept look great. If it works anywhere near as well as the Netduino Plus has it will be a great product and help to the community.
Thanks for all the hard work and time that went into developing this new card and modules.
Chuck
#2
Posted 06 April 2012 - 12:56 AM
Working on posting a few now. The official SDK comes on Monday alongside the classic Netduino's 4.2 RC5 firmware, but we can post the instructions and libraries now so you can get started.
Here are two examples, in the meantime...
To create an RGB LED and make a nice orange color...
GoModules.RgbLed led = new GoModules.RgbLed(); led.SetColor((byte)255, (byte)40, (byte)0);That will find the first RGB LED module on the go!bus. If you want to specify a socket # manually, here's an example:
GoModules.RgbLed led = new GoModules.RgbLed(GoSockets.Socket4);For the Shield Base Beta, we're currently using the exclusive bus mode (like Gadgeteer modules use) to make sure we work out any bugs in the transport before sharing the pins with other sockets. So for the next few weeks, you'll want to put your go!bus modules on one channel and your Shield Base on the other. [For example, put your go!bus modules on sockets 1-4 and the Shield Base on socket 5.]
We'll switch the Shield Base beta to shared pins in a few weeks, once you tell us that things are working well. When we move to the shared pins, this will also enable us to use the fast go!bus transport--which will speed things up dramatically.
To read an AnalogInput on a Shield Base...
GoModules.ShieldBase shieldBase = new GoModules.ShieldBase(GoSockets.Socket5);
AnalogInput analogInput = new AnalogInput(shieldBase.AnalogChannels.ANALOG_CHANNEL_#);
Debug.Print("value: " + analogInput.Read().ToString());
I'll post a few new threads tonight and over the weekend. I'm looking forward to your feedback!Chris
#3
Posted 06 April 2012 - 01:37 AM
Thanks for the rapid reply, that should get me started. I should be able to type "GoModules." and the IDE will show me the options and the installed modules.
Can the new card be programmed in Basic out of the box?
Also just realized that I would be short on cables, the Netduino Go comes with 2 ribbon cables. But the modules do not include cables. I order 12 extra cables but will have to make do with only 2 to start out.
Also for a list of module requests I was looking into a higher bit ADC for those that might need higher resolution, maybe a chip that would work with 5 volt input to avoid converters with some of the older sensors or 4 - 20 ma.
Chuck
#4
Posted 06 April 2012 - 02:24 AM
Yes, yes you canCan the new card be programmed in Basic out of the box?
Ooh, that's a great idea. Maybe we should start a "module request" thread?Also for a list of module requests I was looking into a higher bit ADC for those that might need higher resolution, maybe a chip that would work with 5 volt input to avoid converters with some of the older sensors or 4 - 20 ma.
Chris
#5
Posted 07 April 2012 - 12:30 AM
How do I get Video Studio to show a Template for the Netduino Go! when I am opening a new project?
I have downloaded and installed everything that I could find (may not be in the directory) or should I just wait until the new files are released on Monday?
By the way the new boards look great, I know y'all(southern for everybody)are busy and most likely running short on sleep, but I for one appreciate the effort expended to release a great product and satisfy everyone wants and wish in a very short period of time.
Far to many companies anounce a product then string pieces out over the next year or so with no attempt to support the items.
I am happy to say that is NOT the case with SecretLabs and this forum.
Thanks for the hard work,
Chuck
#6
Posted 07 April 2012 - 12:32 AM
The official SDK will be posted Monday (along with support for the new Netduino/Netduino Plus 4.2 RC5 firmware).
PM me with your e-mail address and I can send you the libraries in the meantime. Folks have been passing them around today, I've been seeing lots of RGB sirens and such
Chris
#7
Posted 07 April 2012 - 03:45 PM
Warnings:
Warning 2 opcode 'add.ovf' -- overflow will not throw exception C:\Visual Studio 2010\Projects\Basic Go Button\Basic Go Button\Module1.vb 16 9 Basic Go Button
Warning 5 opcode 'add.ovf' -- overflow will not throw exception C:\Visual Studio 2010\Projects\Basic Go Button\Basic Go Button\Module1.vb 16 9 Basic Go Button
Warning 1 opcode 'conv.ovf.u1' -- overflow will not throw exception C:\Visual Studio 2010\Projects\Basic Go Button\Basic Go Button\Module1.vb 13 9 Basic Go Button
Warning 3 opcode 'conv.ovf.u1' -- overflow will not throw exception C:\Visual Studio 2010\Projects\Basic Go Button\Basic Go Button\Module1.vb 23 11 Basic Go Button
Warning 4 opcode 'conv.ovf.u1' -- overflow will not throw exception C:\Visual Studio 2010\Projects\Basic Go Button\Basic Go Button\Module1.vb 13 9 Basic Go Button
Warning 6 opcode 'conv.ovf.u1' -- overflow will not throw exception C:\Visual Studio 2010\Projects\Basic Go Button\Basic Go Button\Module1.vb 23 11 Basic Go Button
Code:
Imports System.Threading
Imports NetduinoGo
Imports GoBus
Module Module1
Sub Main()
Dim Led As RgbLed = New RgbLed
Dim PB As Button = New Button
'Dim Pot As Potentiometer = New Potentiometer
Dim Pot As Double = 0.05
Dim i As Integer = 0
Dim ColorValue As Byte = CByte(255 * Pot)
While True
If (PB.ButtonState = True) Then
i = i + 1
If i > 6 Then
Pot = Pot + 0.45
If Pot > 0.95 Then
Pot = 0.05
End If
i = 0
ColorValue = CByte(255 * Pot)
End If
Thread.Sleep(250)
Select Case i
Case 0
Led.SetColor(0, 0, 0)
Case 1
Led.SetColor(ColorValue, 0, 0)
Case 2
Led.SetColor(0, ColorValue, 0)
Case 3
Led.SetColor(0, 0, ColorValue)
Case 4
Led.SetColor(ColorValue, ColorValue, 0)
Case 5
Led.SetColor(0, ColorValue, ColorValue)
Case 6
Led.SetColor(ColorValue, ColorValue, ColorValue)
End Select
End If
End While
End Sub
End Module
The warning may be from not importing a module, but I haven't found the cause, at least not yet. Maybe the code might help someone else get started. Chuck
Edited by Chris Walker, 07 April 2012 - 08:08 PM.
Added [code][/code] tags
#8
Posted 08 April 2012 - 12:10 AM
#9
Posted 08 April 2012 - 01:17 AM
Modules can either run NETMF or really small go!bus virtualized IO firmware.
We're working up a standardized firmware for STM8S, and at least one community member is investigating an AVR port as well.
You'd be able to add your own native code on the module's microchip...and aggregate/process data. The Netduino Go mainboard would read that aggregated data via a virtual serial port or via an aggregate pin/analogChannel.
Chris
#10
Posted 08 April 2012 - 02:41 AM
http://aonomus.wordp...tm8s-discovery/
.. and then load your standardized STM8S firmware, with our own specific modifications?
Are you guys going to provide something like that breakout board above, or are we left to our own devices to see what sort of hardware we can come up with outselves to develop the modules?
I'm fine trying to use something like the above - but I dont want to reinvent the wheel, if there is another suggested platform
#11
Posted 08 April 2012 - 03:30 AM
Are there any plans for a "generic" go module that has just a bunch of exposed pins and code that gets sent over the go bus and run from RAM?
[Edit] Nevermind, I see that the STM8S family uses the Harvard architecture, which means that native code and data are separate. I'm guessing that means that code has to be in flash.
#12
Posted 08 April 2012 - 04:08 AM
For prototyping, we bought a few of these from one of our authorized Canadian resellers:
http://www.proto-adv...ucts_id=2200039
You can actually type in the PN of the MCU you want (I recommend STM8S103F3P6) and they'll order them from DigiKey and assemble for you. Then you can plug it into a breadboard, add the few required parts, and build your own module.
They have sockets on DIP adapters too. We bought a bunch of them during development of Netduino Go.
Chris
#13
Posted 08 April 2012 - 04:10 AM
That would be cool. No plans, but it's very doable!Are there any plans for a "generic" go module that has just a bunch of exposed pins and code that gets sent over the go bus and run from RAM?
Harvard architecture is nice. You can run code from either data or RAM. We'll also have other chip options available soon, including some brand new chips that we haven't been able to talk about...[Edit] Nevermind, I see that the STM8S family uses the Harvard architecture, which means that native code and data are separate. I'm guessing that means that code has to be in flash.
Chris
#14
Posted 08 April 2012 - 04:28 AM
Hi mtylerjr,
For prototyping, we bought a few of these from one of our authorized Canadian resellers:
http://www.proto-advantage.com/store/product_info.php?products_id=2200039
You can actually type in the PN of the MCU you want (I recommend STM8S103F3P6) and they'll order them from DigiKey and assemble for you. Then you can plug it into a breadboard, add the few required parts, and build your own module.
They have sockets on DIP adapters too. We bought a bunch of them during development of Netduino Go.
Chris
Aaah, Im too impatient. I've already ordered the STM8S and STM32F4 discovery proto boards from digikey.
I'm eager to create a go!bus RFID module.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











