Makeblock-official / mBlock

base on scratch offline v2.0 by MIT, Learn more from Makeblock official website
http://www.makeblock.com
GNU General Public License v2.0
320 stars 228 forks source link

Uploading is unclear - needs to use Arduino mode for ultrasonic to work? #30

Closed MathBunny closed 7 years ago

MathBunny commented 8 years ago

When using an ultrasonic sensor, the firmware is only updated fully when Arduino mode is used to upload the code. If you use the normal upload (through COM) then the ultrasonic won't get any reading after you turn it on/off.

Is it just me experiencing this?

ArturoAP commented 8 years ago

You mean trough the option "Upgrade Firmware" or "Reset Default Program"?

I will mess around with this options tomorrow using mbots and me orion, i will let you know if i can recreate the issue.

drew345 commented 8 years ago

I see this is old, but having a similar issue. When I use the ultrasonic on digital pins, it works fine for both upload (Arduino) mode and Scratch (Serial connection) mode. When I use the ultrasonic on the analog pins, it works in the upload mode, but not in the scratch mode. I am trying analog pins A4, and A5. I suspected that the serial mode is using extra power (the US sensor takes a lot of power), but even failed with external power supply. Maybe the serial mode is using those analog pins A4 and A5 for something else and that's why US sensor doesn't work there in Scratch mode. Anyway, I gave up on it for now, but just saw this very similar post so thought I would add my experience.