4 ms·
This is very cool, but I was surprised to see what seems like an obvious bug in your code. In the buzzer() function, it looks like you were trying to use "buzz_
by graue 14y ago
This is very cool, but I was surprised to see what seems like an obvious bug in your code. In the buzzer() function, it looks like you were trying to use "buzz_prev" to optimize away extra writes of 0 when no magnetic field is detected. However, buzz_prev will never get reset because line 57, which sets it to zero, will only be executed if (!buzz_prev), that is, if it's already zero.
- majke 14y agoNice catch Sir! You're right, line 57 should be below 55. Fix: https://github.com/majek/dump/commit/7e9edeba2ead00a24341ec5fa32d28326e7dd55e https://github.com/majek/dump/commit/7e9edeba2ead00a24341ec5...