sleep vs. timedelta
Posted: Tue Dec 19, 2017 7:04 pm
Hi,
For the AstroPi competition, my students would like to pause their script between readings. My students are on the website: https://projects.raspberrypi.org/en/pro ... ata-logger
"Normally in such situations you would use a sleep() function to pause the script. However, this can result in inaccurate readings from some of the Sense HAT’s orientation sensors, which need to be regularly polled.
To get around this, you can use timedelta to check the time difference between two readings."
Is there a preference for using the sleep function or the timedelta? The students are not using the orientation sensor.
Thanks,
Gail
For the AstroPi competition, my students would like to pause their script between readings. My students are on the website: https://projects.raspberrypi.org/en/pro ... ata-logger
"Normally in such situations you would use a sleep() function to pause the script. However, this can result in inaccurate readings from some of the Sense HAT’s orientation sensors, which need to be regularly polled.
To get around this, you can use timedelta to check the time difference between two readings."
Is there a preference for using the sleep function or the timedelta? The students are not using the orientation sensor.
Thanks,
Gail