dwyl / iot-decibel-meter

A decibel meter built with an arduino
40 stars 8 forks source link

Using arduino ide (C++) instead of johnny-five #16

Closed naazy closed 6 years ago

naazy commented 6 years ago

I was getting inaccurate results when using johnny-five (https://github.com/dwyl/iot-decibel-meter/blob/e021acb78751e579dbeb335dbc126a21b4749e91/sound.js) and powering the arduino via rasperry pi / my laptop. I'm going to try to run the code using the arduino IDE instead and connecting the arduino to a battery/into the wall socket because according to the hookup guide:

Powering my Arduino with a 9V external supply, which allows the onboard regulators to function, the Arduino’s 5V output was sufficiently clean. However, powering it from the 5V available on the USB port on a PC, the regulators are bypassed, and the results were somewhat less usable, and vary greatly between different ports on different PCs. A powered USB hub will probably provide cleaner power than the ports on the PC itself.

I think programming this using the arduino IDE may also be more user friendly for a future dev because there johnny-five is not fully compatible with all modules and there are less tutorials

naazy commented 6 years ago

Hooray! This worked:

https://youtu.be/mYaD5LH4KYI