Video with MakeCode in Description. I do not see programs for using Mbit cell phone app. with Kittenbot Robotbit to drive motors. This program is good for both iPhone and Android when installed in the new Microbit V2. Many more functions to be developed:
Video: Thanks to @bsiever we are able to use the Mbit app by Yahboom to communicate with one program in a new Micro:bit V2 which has 2 extensions, one for Maqueen bot car (2 wheel) and one extension for the Robotbit motor driver with 4 DC motors. This works with both iOS and Android Bluetooth. Unlike Micro:bit V1.5 we do NOT need to re-program the V2 for each cell phone platform. Thanks Bill ! MakeCode is in the description of the video:
Hi Frank, very nice project. By chance I saw this video and it’s funny: I used to build a Wall-E-robot also with the Robotbit-board, same Geekservo-motors and the Mbit-app. Works fine! Since I added two more motors for using Macanum wheels I was not able to compile the code again, and I have no idea what is wrong. Any chance to share our Software?
Yes, @Werner_G , this is the program used I try to include programs in the description of each video: https://makecode.microbit.org/23873-14806-82298-65556
Here is a better program for mecanum wheels which we are developing for cell phone control, works with Microbit V2, iOS and Android. We can add motor control by pressing a piano key in the Mbit app. that is by Yahboom. https://makecode.microbit.org/_KyKRJa1kUAbC , I find that if I try to add music, more than just a single tone, it does not compile. That is my only suggestion. Otherwise it always compiles for me.
Video showing the 4X Mecanum wheel transporter with Microbit V2 and Robotbit. The code in the video description includes the extension for DF Robot micro maqueen also. https://youtu.be/MqcxpH5tRrA . we use the Yahboom Mbit app. on both iOS and Android phones.
Not compiling may be due to being out of memory on the micro:bit. It’s possible that if you’re on a V1 moving to a V2 will help. I think Frank’s example of compilation breaking after adding in just one more feature is likely due to this.
Extensions can use a lot of memory and, in some cases, can be “trimmed” a bit. For example, in response to an earlier thread of conversation about the MBit app, I made a simplified MaQueen library that omits some features. (Here’s the discussion: Android app/Discord - #13 by bsiever ; Here’s the URL for the condensed MaQueen extension — it can be pasted in when searching for an extension: https://github.com/bsiever/pxt-maqueen)
Thanks Frank. Your code is running Ok here, I will adapt it to my needs and share it to you.
Maybe you have a YouTube channel, Werner ? If so, it would be great if you could make a video showing your code working. This helps other kids and tutors/parents/teachers to understand what is possible. It does not have to be a professional video . Thanks
Speaking of difficulties with extensions, Bill; I wonder why there is this conflict between Bluetooth and the 51 bit Colorbit extension. I would like to add the 5X5 neopixel Colorbit to our bot car and use the Mbit app also. https://github.com/51bit/ColorBit, Thanks,
So, here we are: https://makecode.microbit.org/_5uWf8jWjjfeR
Avoid mode is not working properly. Any idea?
Normally, I am using M5Stack-parts, but still there is no BT-control possible
Hi @frank_schmidt, I think I already answered here: Extension Conflict?, but the basic summary: Both Bluetooth and NeoPixels require really precise timing and both are at the limit of what the v1 could do. It couldn’t reliably do both at the same time. The ColorBit extension uses Microsoft’s ws2812b (NeoPixel) Extension…Microsoft was aware that you couldn’t reliably use both Bluetooth and NeoPixels, so they made their ws2812b extension mutually exclusive with Bluetooth…which means that the ColorBit also ends up disablinging Bluetooth.
About the only alternative is to use some other external module that eliminates the timing problem or use multiple micro:bits. For example, two micro:bits could communicate over a wired (serial) connection. One micro:bit would be able to handle bluetooth and the other neopixels. Of course, this introduces others sources of complexity
Hi @frank: your videos are really great, I cannot make it better. And my English is not as good to explain something. But you can please explain the wiring of your 4X Mecanum Wheel transporter - is it:
FrontL = M1A, FrontR = M1B, BackL = M2A, BackR = M2B ?
@ Bill: my experience is to use functions for drive-definitions to reduce Code size, and I checked that the MaQueen-lib causes conflicts with the US-sensor. Would be great to use VL53LXX instead.
My left front is M2B, FrontR is M1A,BackL is M2A and Back R is M1B., This is the way Phillip wired it on Monday and then he worked out the code to match. You program has our car going right when left arrow is pressed etc. No problem, we are just working out the early details. We will expand many motors using piano keys as controls; it the Microbit can handle the extra processing. l have not tried ultrasonic at all. I was stationed in Germany in the US Air Force in the early 1970’s; it was near Bitburg and called “West Germany” at the time.
Video, I demonstrate the use of Mbit app and Neopixel. This is with Android and Robotbit using @Werner_G program and I added Neopixel blocks to the piano key controls. I avoid timing issues altogether and have not tested these displays beyond simple on/off/color. I did include the share code in the video description and I did turn off the LED display on the Microbit in code. With Neopixel activated and displaying color, it does not seem to interrupt the Bluetooth controls so I think the kids will find this useful displaying their own simple colors and patterns for each motor action or musical notes. I would think a Neopixel strip should work just as well. We have made a Barbie wedding ring with a single Neopixel in the past so we will try that also here. Thanks @bsiever for getting us started on this bluetooth project. I think your Minimal Maqueen can be included without corrupting the compiler so kids can switch back and forth between different bots with a simple base program.
@Werner_G Can you provide a little more detail about the conflict? Are you getting a specific error message or is the compilation just failing?
Yes, defining right and left is of course also depending of how you locate the Micro:bit. My actual code is here:
I am wondering why you use ‘150’ for rotating left or right. Maybe you can explain, because I still cannot go direct 90° or 270°. Reason might be my motors, which are not calibrated and not running with same speed. And: my ‘avoid obstacle’-mode is now working. A new video from you is coming?
So, we are in same age doing something for our grandchildren?! I am living in Dortmund, not too far away from Bitburg.
I’m new in this forum. Therefore, my answers are being published after approval, mainly after some hours.
@bsiever: the Maqueen minimum setup can be compiled, no prob. As soon as you want to include the Sonar, you cannot compile. No specific error-message. As soon as you delete all Maqueen elements, compilation works.
Welcome to the forum @Werner_G! (By the way, I think posts are always delayed for everyone to ensure appropriate content)
I just tried your example and it did give me a .hex file. That is, it appears to have compiled fine. Here’s a shared version, but I haven’t changed anything at all: https://makecode.microbit.org/_MjhLh18wg5Ao
The first few times I tried to download it, I wasn’t given a hex file, as if the compilation failed…but now it seems to work.
This post was flagged by the community and is temporarily hidden.