Please always enclose your code in triple backticks ```\ (I edited your message above to make it readable).
I haven't used those ADCs in years.
Derek Molloy tends to cover Beaglebone very well, I am sure most of the details there would be transferrable to the PocketBeagle.
What you are doing seems in principle right, assuming the
LDR_PATH is right.
However, it seems a bit of a waste to:
- allocate memory for the string
- copy he path to the string
- open the file
- close the file
every time you want a read. This is definitely not very CPU friendly. You should only perform the read (
fs >> number;) in the aux task, everything else should be done at
ifenta I also tried putting this code in the loop when the audio is being played back, but that cause my CPU to spike.
What does this mean? How are you running in it when audio is not being played backk?
How often are you scheduling that
ifenta I want to make multiple of these boards.
You may be interested in reading the
MAKING PRODUCTS WITH BELA section here