Programming Netduino Go
Posted 06 April 2012 - 12:45 AM
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!
Posted 06 April 2012 - 01:37 AM
Posted 06 April 2012 - 02:24 AM
Yes, yes you can We fully support Visual Basic on Netduino Go.
Can 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.
- Arron Chapman likes this
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,
Posted 07 April 2012 - 12:32 AM
Posted 07 April 2012 - 03:45 PM
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
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 ModuleThe 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.
Edited by Chris Walker, 07 April 2012 - 08:08 PM.
Added [code][/code] tags
Posted 08 April 2012 - 12:10 AM
Posted 08 April 2012 - 01:17 AM
Posted 08 April 2012 - 02:41 AM
.. 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
Posted 08 April 2012 - 03:30 AM
Posted 08 April 2012 - 04:08 AM
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.
Posted 08 April 2012 - 04:28 AM
For prototyping, we bought a few of these from one of our authorized Canadian resellers:
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.
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.
Posted 08 April 2012 - 06:15 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users