OttoDIY / blockly

Otto Blockly; a fully integrated graphical programming for any type of Arduino projects, including robots, ready to install in your computer, it works offline and also online
https://www.ottodiy.com/software
GNU General Public License v2.0
114 stars 80 forks source link

Sound example issues #110

Closed brendonhatcher closed 2 years ago

brendonhatcher commented 2 years ago

Using Blockly 1.4.3 I added a noise sensor using the pins in the Google Presentation "Getting started with Otto DIY robots".

If I use the "Serial noise readings | +sensor" example, it works correctly. If I use "Sound interaction | +sensor" then the Otto doesn't move when I make a sound.

The reason appears to be that "Sound interaction" uses digitalRead to gather data from the analogue sound sensor and treat it as high or low. According to Arduino, A6 on a Nano cannot be used for digital readings: https://www.arduino.cc/reference/en/language/functions/digital-io/digitalread/

The Sound interaction example needs to change to: https://imgur.com/a/Kxk59wd

cparrapa commented 2 years ago

Thanks for noticing fixed already for next release solved here https://github.com/OttoDIY/blockly/commit/e68532c32e563b06385c25dc819042a98d450e55