I’m having the same problem. I’ve tried different ports and cables. Nothing. If it’s working for you, can you say if there is any other sign that the board is active (e.g., it looks like there are a few LEDs below the TM1640 IC … Do they light up when the board gets power?)?
New mBot LED Matrix not working
While trying out to program the ultrasonic sensor, my daughter pointed me at the strange coincidence that suddenly the LED matrix started to show some dots for the first time…
So in some way the LED matrix shield has power. It is provided with some initial setup showing rubbish and I can’t see any LEDs on the backplane shining.
Next version: The (pseudo) clock!
Code looks like this:
The text “Hi!” will still not show.
Furthermore, the sensing function to get current hour and minute, are not supported. Maybe I need some additional library. So the clock does not update…
Again, I need to tweak the code in Arduino IDE, since I get two compile time errors. I think it’s possibly because I use Arduino IDE 1.6.5. If you have the same error, you need to replace excessive double quotes. Especially in the code for formatting the code to show the “time”.
There is a new post today in the Makeblock academy, which provides a screenshot of a program which will make some text visible on the LED matrix.
Works perfect!
You need to fiddle around with positioning the text and I wanted the loop to execute even if the mBot is not connected to the laptop. Looks as follows:
Please note: Clock will not update!
That got the text to scroll. But I guess something must be wrong with my mCore casue no matter what port I send the show face command to, it will display only on port 1. For example, I set the code to go to port 4 but with the led display still in port 1 and it will display on port 1. When I plug into port 4, I get nothing.
Your right!
It is because the parameter x
to the MeLEDMatrix ledMtx_1(x)
constructor does not get used in the real code of the respective class. If you open the code in Arduino IDE, in one of the tabs you’ll find the MeLEDMatrix
implementation, and as you can see, nothing happens with the port
parameter.
I guess the mBlock is currently still under development, and therefore these things will only disappear over time.
Hi, I’m facing the same problem programming the mbot to get something showing on the face. I have arduino 1.6.5 ide and get the following same as yours on upload to mbot
project_1_____6_0.ino.cpp:55:35: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
I used code same as yours in mblock with face, port1, x:xpos,y;0,character:;
then at the end
showtime port1 etc
If I put a string in character I get an additionalt error
project_1_____6_0.ino.cpp:36:30: error: expected ‘)’ before ‘hi’
Can you show your c code on your working code please, ta
Hi, In arduino IDE I’ve removed 1 set of quotes from last as suggested
ledMtx_1.drawStr(xyz,0,“hi mbot”);
for the showClock I get the ISO C++ forbid comparison between pointer and integer
ledMtx_1.showClock(22,35,":"==’:’);
I can run the script shown by HIP70890 but only via mBlock using the green flag. If I try to upload it then I get the errors mentioned a few times with additional “” and the error: ISO C++ forbids comparison between pointer and integer [-fpermissive] which is to do with the clock formatting I think.
Even simple scripts I can’t upload so that they keep running when the PC is not connected.
Anyone any idea what I am doing wrong or am I missing the point of how this works?
OK, the block code seems a bit buggy.
edit the mbot block code in arduino ide (close mblock scratch)
ledMtx_1.showClock(22,35,":"==’:’);
for the above line replace single quotes around colon character with double quotes
For showface block around the comment remove one set of quotes.
Upload the amended code to mbot from arduino ide.
LED faceplate Install Instructions?
@waldywiz & @Chris: You’re right, the compiler issues an error. First I thought it was because of using Arduino IDE 1.6.5, later revised this: I think mBlock is still a little buggy, and has to code generation templates which issue extra quotes where they should actually should actually one pair of them.
I guess we have to wait for the next version of mBlock and hope that these bugs disappear.
In the sensing command group there is a value block for (current [minute]) that can be used in the clock mode of the led display
@danjger: Did you try that out (upload to the mBot) or do you assume this might work?
I actually tried exactly that some weeks ago, and got a compile time error, saying that this feature is not supported.
I found it pretty plausible, since I suppose/understand the mBot doesn’t have a RTC.
Maybe you have a different mBlock version (I have 2.1.5-0616 for Mac) or your parameters are different?
Can you check this?
2.1.5.06.16.001
I got it to show the correct time in the display but using the scratch over bluetooth method, not by downloading the arduino code but I will try that later when I can.
Now I have to make a custom mount since I am NOT taking off the ultrasonic sensor.
I suppose the time I got was from the PC so when I do the download I’ll see of those blocks really do provide the time that way.
I found that the LED matrix will fit quite nicely between the two I/O RJ blocks. Meant I didn’t have to remove the ultrasonic sensor
It is the arduino version that needs updating. I just got 1.6.5 (with mBlock 2.2.0)
https://www.arduino.cc/en/Main/Software
my led matrix code compiles great now.
Had the same issue. Could only use show Time but nothing else. Resolved by shutting off robot and mbot software. Then connect USB cable to robot. Start software and robot.
Then choose connect serial port, com 3 (take the highest if you have several), then click Connect and Upgrade firm ware. Done. Screen now works with everything.Are there a maximum amount of characters you can scroll? I would think not but I seem to get limited when I enter more than “Hi mBoters” in the showface command. I have tried increasing the x_pos variable from 24 and also the repeat until x_pos command. Sorry if I don’t quite understand the code. Thanks, Tom
So I was playing with the ideea of using mbot to make a more functional nightlight for my kid. I used the LED matrix to display a clock face and whipped up some scratch code to make it work like a clock. Unfortunately there’s no way to save the state or to keep the clock running when the mbot is off, so I set it up so that it’s easy to reset the time using the included IR remote. It does the job alright, though it could be better.
Here’s the code:
Of course, make sure your clock code lines up with your LED port.