Lightsensor onboard doesnt work after upgrading to v3.2


#1

the onboard light sensor reading doesn’t work properly. showing only 1023 without changes with different light source. while the reading of A6 by arduino shows correct response to the environmental lights. considering i had played this sensor perfectly in v3.1, I am pretty sure it is a bug in v3.2 which may incorrectly setting the wrong analog pin in the firmware, same problem happened to the flame sensor blocks in mblock, pls upgrade firmware and fix this problem. thx.

—Ted


#2

Same issue here… :cry:

–Fed


#3

Using 3.2.1 I confirm that the light sensor does not work through mBlock when I “Reset Default Program” but IS working when I use “Upgrade Firmware”.

I also confirm that the light sensor is working fine in standalone Arduino code. So it looks like a problem with the “Reset Default Program” .hex file.

Although there is a .ino sketch file for “mbot_factory_firmware” in the “mBlock\Arduino\libraries\makeblock\example\Firmware_For_mBlock\mbot_factory_firmware” folder, compiling and uploading this sketch does not seem to produce the same behavior as “Reset Default Program”. Using this source, the light sensor works!


#4

just upgrading to 3.2.1, seems the problem had been fixed. remember to upgrade the firmware before do the test.


#5

@Sunny_Sun
The issue isn’t fixed in 3.2.1. The Factory Default Program that is loaded with “Reset Default Program” doesn’t behave properly.

Using “Upgrade firmware code” is a useful workaround, but we should be able to use mBlock with the factory default program.

Currently we can either use mBot’s light sensor and on board LEDs with mBlock by running the “Upgrade firmware code”…
OR…
We can control the mBot with the IR remote/use line following mode/etc, (as shipped) by using the “Reset Default Program”.

The mBot Default Program should work properly with mBlock. There are now numerous threads related to variations of this same issue:
mBlock 3.2.1 loads faulty default program
mBlock 3.1 lights wrong LEDs on mBot via 2.4G
mBot - Programme detect brightness from external source

Etc…