Light Sensor not working [Solved]
Comments
-
I am assuming there is no problem now ?
Also, a quick pointer for coding:
Your two when PicoBricks light sensor scripts are already detecting the conditions of interest to you. You could simply graph them in their respective scripts and eliminate the when started script. That one is in a tight forever loop, churning your cycles without any need.
It does not matter for this small project, but if you had other activities going on, you could provide some relief to your project by adding small wait cycles in the two when scripts; thus improving the responsiveness of the code. With an event resolution of 20usecs, MicroBlocks will examine these conditions 50K times a second; a bit of overkill! Since environmental light conditions do not vary that suddenly, your project might be happy with a lesser sampling, eg: wait 500ms.
Enjoy exploring MicroBlocks.
0
Howdy, Stranger!
Categories
- 117 All Categories
- 3 Community
- 3 Hello Maker!
- 102 PicoBricks - Make, Run, Split, Merge
- 1 PicoBricks IDE
- 1 Arduino IDE
- 31 Hardware Support
- 15 PicoBricks Backers Hub
- 49 MicroBlocks Support
- 3 Shipping Support
- 2 MicroPython
- REX - 8 in 1
- Mechanical Parts and Parkour
- REX Main
- Arduino-IDE
- REX - Shipping
- 12 Products & Technology
- 2 Raspberry Pi
- Arduino
- 10 Other