So much awesome. My 12yo son has been doing some Scratch programming, so I’m sure he’d love to try this, as would my 8yo.
I had gotten the SparkFun Digital Sandbox (https://www.sparkfun.com/products/12651) for my 8yo, so it will be very interesting to compare/contrast the experience of working with the BrainPad to that, since it’s probably the nearest comparable Arduino environment.
But being able to tie in with Scratch is a really great way to expand the reach of the project!
Thanks @ scardinale for this work. Can I take a guess? I think you have used C# to VB translator.
I have looked at the VB code briefly, there are parts that could be improved. For example, [em]Exit Select[/em] statements are not needed, [em]OrElse[/em] instead of [em]Or[/em] operators could be used in multiple places, the following could be simplified:
Public Property Frequency() As Integer
Get
Return m_Frequency
End Get
Set(value As Integer)
m_Frequency = value
End Set
End Property
Private m_Frequency As Integer
Public Property Duration() As Integer
Get
Return m_Duration
End Get
Set(value As Integer)
m_Duration = value
End Set
End Property
Private m_Duration As Integer
Public Property Delay() As Integer
Get
Return m_Delay
End Get
Set(value As Integer)
m_Delay = value
End Set
End Property
Private m_Delay As Integer
to
Public Property Frequency as Integer
Public Property Duration As Integer
Public Property Delay As Integer
Some things could be improved looking at Resharper suggestions.
[quote=“Gus”]
@ ianlee74 - where did I say it is not open? And how would the community contribute off it is not open? In fact, the code is already posted in this thread. :)[/quote]
Here’s an image of the first successful connection between Scratch and a BrainPad running Firmata. I have Firmata drivers for Cerbuino Bee, Cerbuino Net and BrainPad (and will add drivers for each of the GHI boards in turn).
I am currently working on the Scratch blocks for the BrainPad (you can use the standard Arduino blocks for Cerbuino boards). I am also wrapping up work on a protocol gateway and deployment tool that allows you to configure your boards and deploy the Firmata firmware without using Visual Studio (including some Gadgeteer configuration). The Scratch for .Net version of Firmata works over serial or ethernet. For serial, you must either have a second USB-to-serial dongle (see image), a Bluetooth ‘Bee’ daughter board, or be running firmware that allows your USB port to be reconfigured for serial, which is not supported in all models and firmware.
This is an open source project and source code will be made available. Binary installations and instructions will be available on a dedicated web site. This project was made possible through the generous support of Gary and Gus and GHI Electronics.
@ mcalsyn - Great work. I’m more excited about using the Brainpad with Scratch than anything else. However, if that’s the configuration then I think we really need a second USB port on the board. That’s not going to work for the kids classes. Once the server is running on the board is it possible to direct the 2nd serial communications through the main USB port?
But that means updating at least the firmware, and maybe the USB hardware too (I’m not clear on that) so that the code above works correctly. Redirection works on some GHI boards, but not the Cerbuinos or the BrainPad for now.
The sidecar serial solution is just a temporary fix so that I can complete the Firmata server code for the BrainPad. I agree that it is probably not practical for normal use.