Skip to content

Uploaded all necessary Python code - #1

Open
ChevadyLin wants to merge 1 commit into
mainfrom
ChevadyLin-patch-1
Open

Uploaded all necessary Python code#1
ChevadyLin wants to merge 1 commit into
mainfrom
ChevadyLin-patch-1

Conversation

@ChevadyLin

Copy link
Copy Markdown
Collaborator

Main.py keeps track of all sensors and whether they are sensing their phenomena. This was done to increase readability in the main file.

Smaller python files for each sensor are included. Each sensor file includes a main(), init(), and, in some cases, a read_adc() function. The init() function sets up all of the necessary pins for each sensor to either an output or an input. The main() function returns the sensor reading and, if it is above a predefined threshold, returns a value of True. The value is False otherwise. Finally, the read_adc() function is used to transform ADC values to corresponding voltage values which are then used to determine appropriate sensor thresholds.

Main.py keeps track of all sensors and whether they are sensing their phenomena. This was done to increase readability in the main file. 

Smaller python files for each sensor are included. Each sensor file includes a main(), init(), and, in some cases, a read_adc() function. The init() function sets up all of the necessary pins for each sensor to either an output or an input. The main() function returns the sensor reading and, if it is above a predefined threshold, returns a value of True. The value is False otherwise. Finally, the read_adc() function is used to transform ADC values to corresponding voltage values which are then used to determine appropriate sensor thresholds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant