-
Notifications
You must be signed in to change notification settings - Fork 2
Code
needs review
Calibrates the emitter/sensor channels, tries to get the freshly inoculated media as close to a sensor output of 0.3V (ADC value 1600) as possible to allow for maximum capacity for growth sensing, as well as a little buffer for the media getting clearer before it occludes
needs review
Constantly outputs the ADC values for a single tube box selected by the 4 Channel switch, to the LCD display. Does NOT record any of the information anywhere!
Returns the ADC value of a single tube channel, sums up all adc readings and finds the average of the readings by dividing by the number of readings taken.
Param | Type | Description |
channel | int | Number of channels there are to read |
Type | Description |
double | Returns average adc values, rounded up |
needs review
Writes the current time and channel output values from the data structure to the current file on the SD Card
needs review
Sends the data packet to the server via the Ethernet Shield
Param | Type | Description |
on | boolean | Checks if the Ethernet shield is on or off |
needs review, uses time to see when to raise platforms might not be related, but best to check
Method that stops the shaker, turns off the relay, and waits for the table to come to a stop.
needs review
Turns on the relay, which in turn powers on the shaker table, which holds onto the last set value, and spins up to that rpm. This function doesn't wait for the shaker table to get up to speed
needs review, this has variables that use time so we might want to look into it.
Though i don't think it will be related.
Also the while loop within this code is empty. Might want to look at if it's supposed to be intentional
Raises the lifting platform, and waits until it is completely lifted
needs review, has variable that uses time might not be relevant, but good to check Problem in code, where it pauses forever, says in notes it would be better for this to be programmed to gracefully recover from
Lowers the platform and waits for the platform to come to a complete stop.
Prints to the Serial console the timing information currently set (and passed)
Param | Type | Description |
scan_time | unsigned long | scan time to print to the LCD |
Sets the multiplexer channel select pins to the channel passed
Param | Type | Description |
channel | Int | sets the selected channel for the multiplexer |
Prints a passed message to the lines on the lcd, each line are trimmed to 20 characters, or filled with white space to make up 20 characters.
Param | Type | Description |
first_line | String | first line the first message will be displayed on |
second_line | String | second line the second message will be displayed on |
third_line | String | third line the third message will be displayed on |
fourth_line | String | fourth line the fourth message will be displayed on |
Prints the passed messages to the first three lines on the LCD, using the fourth line as a place for PAUSE and RAM information
Parameter | Type | Description |
first_line | String | First line to print on the LCD |
second_line | String | Second line to print on the LCD |
third_line | String | Third line to print on the LCD |
Needs review
Takes in the row and column and the data associated with it and prints it to the lcd screen.
Param | Type | Description |
Column | Int | The column number |
Row | Int | The row number |
Data | Int | The data value at the selected column and row value |
checks to see if the message is greater then 20 characters, changes it to 20 characters, and returns the message, if it's less, returns the message with nothing done.
Param | Type | Description |
msg | String | takes in a string that will be returned with 20 less characters |
Type | Description |
String | returns the message, either the original or trimmed to 20 characters |
Returns a String of desired length containing a desired string appended with spaces until a desired length has been reached
Param | Type | Description |
msg | String | String to append whitespace to |
desired_length | int | length of string to output with whitespace |
Type | Description |
String | A String of length determined by the desired_length parameter |
needs review
Determines if SD Card access is possible, and if so sets the system to do so and figures out which file to write to on the SD Card.
Filenames conform to the following formatting:
1M30D.csv - this file would be the first file written to the card on January 30th
1M30D1.csv - this file would be the second file written to the card on January 30th
1M30D99.csv - this file would be the last acceptable file written to the card on January 30th since filenames must conform to 8.3 format
12M9D7.csv - this file would be the eighth file written to the card on December 9th
Sets the background colors of the LCD to Red, Green or Blue values passed in the array. In the order of RGB.
Param | Type | Description |
colors[] | Int | Takes in an integer to set the background as red, green or blue |
When the pause button interrupt is triggered, this service routine sets the pause flag
needs Review (I believe they said this was not working??)
If the pause flag is set, pauses the system if it was unpaused, and unpauses the system if it was paused
Needs review, has a part of the code that the original programmer wasn't sure it was for
Pauses the system, halting it from any further activity until the pause button is pressed again.
Disables pause button and interval knob so that nothing can disturb the delicate tasks performed while the system is in this mode. Also sets "critical-section" backlight color on LCD
needs review
Re-enables pause button and interval knob, also restores normal mode backlight color
needs review
Checks 4-channel rotary knobs and sets the data interval according to the set knob.
Checks the 8-ch rotary knob and sets the tube box to take continuous readings from in debug mode to that which is set by the knob, if the eight_channel_flag is set
Sets the eight_channel_flag upon 8-ch switch interrupt interception
needs review
Sets the four_channel_flag upon 4-ch switch interrupt interception