Hi,
I would like to program in the way that the mbot detect the brightness from a phone flash light then perform some task. Unfortunately is not working anything that I have missed?
Hi,
I would like to program in the way that the mbot detect the brightness from a phone flash light then perform some task. Unfortunately is not working anything that I have missed?
@Kenneth_Phang,could you please send your program to us by Support@makeblock.cc? We would have a check firstly,thanks!
I think you got me wrong here. I want to detect brightness from the phone flashlight then perform some task see the lighton block.
i found the onboard light sensor’s reading is always 1023 after upgrading to v3.2. take a look, maybe that is the reason why it doesn’t work. simple fix is read the A6 (which is connected to onboard light sensor directly) with arduino block, rather than the light sensor block in mbot. Good Luck…
–Ted
Hi Kenneth, I just ran a test program. I used light sensor block instead of lighton. It works.
@Sunny_Sun Light sensor block works with mBlock v3.2 in my test.
Hi, Pioneer, thank you for your reply, I use the same code as you, same number. see here.
I hope this can help you debug this problem
—Ted
I tested on the mac version it didn’t work. Not the windows version. I tested the windows version it work.
Hi Ted, the light sensor on mBot is connected with A6. You can check the mCore pcb diagram at https://github.com/Makeblock-official/mBot/blob/master/pcb/mCore.pdf
So, in Arduino Program mode, A6 should be selected to read data from light sensor. I’ve talked with our mBlock developer. It’s a bug of defining light sensor port on mBot block. Thanks for your feedback and support.
My light sensor doesn’t appear to be working, but I don’t have a Read Analog Pin command. Was that removed?
Hi ratemyrobot,
With the Arduino option chosen under Extension,you can see the program block read analog pin.
Ok, I see the issue now, Chromebook doesn’t have that extension. I’ll have to use the desktop application to use the onboard light sensor.
It also appears as though there is a bug with the “set led on board” command. When you load a program on the desktop app that was created on a Chromebook, it says that command is now undefined. Doing the opposite (creating on the desktop app and then loading on the Chromebook) seems to work.
Hi ratemyrobot,
The chromebook version mBlock is Experimental version, For the issue of it, we will record. Thanks for your feedback!