mBlock ver. 3.4.11 with Scratch 2.0, Serial Comms. ?
This software works well with my laptop Windows ver. 7. After having installed the firmware for my Mega 2560, and running in Arduino mode, the results were good. I understand after much searching, and experimenting, that serial communication is only possible in Arduino mode; is that correct? This however is only accomplished after installing your firmware, which overwrites the Arduino program. If I want to keep my Arduino program from being overwritten, and just recieve a simple character like A or B etc…, I can do this by using Arduino mode, and the send option with send encode mode in char mode. As this can be done without installing your firmware, I believe (perhaps incorrectly) that it would not be too difficult to send simple char data to a microcontroller without having to overwrite the firmware. Thanks.
mBlock
When you say serial communications, are you referring to over-the-wire or over the air? I routinely monitor things via the serial connect using a USB cable. I haven’t had a chance to play with monitoring via the 2.4G WiFi module, but here is a link to that discussion.
Thanks for the link. For simplicity I’m using over the wire USB to Arduino. I’ve done a lot of Arduino programming (Arduino IDE) and was hoping to find a graphical user interface program such as Scratch or Tynker, that I could use for educational purposes. My intent was to build a simple GUI that can be used not only for graphics but also to send simple char commands to the Arduino, which would then do it’s thing, such as read I2C sensors, adjust linear actuators…etc… I realize with what I’m currently using a person can control an Arduino (to a certain extent) within mBlock/Scratch, but it requires the Arduino program be overwritten with mBlock firmware, and while in Arduino mode you cannot run your Scratch graphics/scripts. Thanks.
I’m currently also working on a Java library to connect to the ranger, either through the serial al through a optional bluetooth dongle. I have the basics up and running, including a short program on the ranger itself.
Since the program on the ranger doesn’t use anything ranger specific other then turning the LEDs on and off, the main parts should be easy enough to convert to any of the other robots.
Over the coming days I plan to put everything in an easy to use library, including the sb2 file with the mBlock code. Then I’ll start working on getting data back from the various sensors, or at least a basic framework for that since I don’t have access to all the various sensors…
communication library is now up on gitHub:
https://github.com/ractoc/mblock-communications
I handles all the connection and communication stuff. The actual data being send and received is somewhat up to the person implementing the library.
Off course, when I actually start using this thing, some changes will probably be made to the setup.
This library is fulle compatible with the block provided by the mBlock (version 3) software.
I haven’t tested it on the new mBlock 5 yet though, since the needed extensions are not yet availlable there.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.