You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set the level of verbosity of function outputs to change the level of information shown when functions are called.
77
+
78
+
| Verbosity | Example using `e_stop()`|
79
+
| :--- | :--- |
80
+
|`0` The function will return with no output. | No output. |
81
+
|`1` The name of the function will be output. |`e_stop called`|
82
+
|`2` The name of the function will be output with additional information about the return value. |`Triggered device emergency stop at: 2024-08-21 11:16:18.547813`|
83
+
76
84
## :compass: Functions
77
85
78
86
```
@@ -106,7 +114,7 @@ sidecar-starter-pack/
106
114
### authentication.py
107
115
108
116
| class `Authentication()`| Description |
109
-
| --- | --- |
117
+
|:--- |:--- |
110
118
|`get_token()`|[API] Get FarmBot authorization token. Server is "https://my.farm.bot" by default. |
111
119
|`check_token()`|[API] Ensure the token persists throughout sidecar. |
112
120
|`request_handling()`|[API] Handle errors associated with different endpoint errors. |
@@ -118,7 +126,7 @@ sidecar-starter-pack/
118
126
### basic_commands.py
119
127
120
128
| class `BasicCommands()`| Description |
121
-
| --- | --- |
129
+
|:--- |:--- |
122
130
|`wait()`|[BROKER] Pauses execution for a certain number of milliseconds. |
123
131
|`e_stop()`|[BROKER] Emergency locks (E-stops) the Farmduino microcontroller and resets peripheral pins to OFF. |
124
132
|`unlock()`|[BROKER] Unlocks a locked (E-stopped) device. |
@@ -128,7 +136,7 @@ sidecar-starter-pack/
128
136
### broker.py
129
137
130
138
| class `BrokerConnect()`| Description |
131
-
| --- | --- |
139
+
|:--- |:--- |
132
140
|`connect()`|[BROKER] Establish persistent connection to send messages via message broker. |
133
141
|`disconnect()`|[BROKER] Disconnect from the message broker. |
134
142
|`publish()`|[BROKER] Publish messages containing CeleryScript via the message broker. |
@@ -140,15 +148,15 @@ sidecar-starter-pack/
140
148
### camera.py
141
149
142
150
| class `Camera()`| Description |
143
-
| --- | --- |
151
+
|:--- |:--- |
144
152
|`calibrate_camera()`|[BROKER] Performs camera calibration. This action will reset camera calibration settings. |
145
153
|`take_photo()`|[BROKER] Takes a photo using the device camera and uploads it to the web app. |
146
154
<!--- | `photo_grid()` | [BROKER] Returns metadata object about point grid required to perform a scan of the full garden. | --->
147
155
148
156
### information.py
149
157
150
158
| class `Information()`| Description |
151
-
| --- | --- |
159
+
|:--- |:--- |
152
160
|`get_info()`|[API] Get information about a specific endpoint. |
153
161
|`set_info()`|[API] Change information contained within an endpoint. |
154
162
|`safe_z()`|[API] Returns the highest safe point along the z-axis. |
@@ -168,15 +176,15 @@ sidecar-starter-pack/
168
176
### jobs.py
169
177
170
178
| class `JobHandling()`| Description |
171
-
| --- | --- |
179
+
|:--- |:--- |
172
180
|`get_job()`|[BROKER] Retrieves the status or details of the specified job. |
173
181
|`set_job()`|[BROKER] Initiates or modifies job with given parameters. |
174
182
|`complete_job()`|[BROKER] Marks job as completed and triggers any associated actions. |
175
183
176
184
### messages.py
177
185
178
186
| class `MessageHandling()`| Description |
179
-
| --- | --- |
187
+
|:--- |:--- |
180
188
|`log()`|[API] Sends new log message via the API. Requires the page to be refreshed before appearing. |
181
189
|`message()`|[BROKER] Sends new log message via the message broker. |
182
190
|`debug()`|[BROKER] Sends debug message used for developer information or troubleshooting. |
@@ -185,7 +193,7 @@ sidecar-starter-pack/
185
193
### movements.py
186
194
187
195
| class `MovementControls()`| Description |
188
-
| --- | --- |
196
+
|:--- |:--- |
189
197
|`move()`|[BROKER] Moves to the specified (x, y, z) coordinate. |
190
198
|`set_home()`|[BROKER] Sets the current position as the home position for a specific axis. |
191
199
|`find_home()`|[BROKER] Moves the device to the home position for a specified axis. |
@@ -196,7 +204,7 @@ sidecar-starter-pack/
196
204
### peripherals.py
197
205
198
206
| class `Peripherals()`| Description |
199
-
| --- | --- |
207
+
|:--- |:--- |
200
208
|`control_servo()`|[BROKER] Set servo angle between 0-100 degrees. |
201
209
|`control_peripheral()`|[BROKER] Set peripheral value (ON/OFF or slider value from 0-255) and mode (digital or analog). |
202
210
|`toggle_peripheral()`|[BROKER] Toggles the state of a specific peripheral between 'on' (100%) and 'off' (0%). |
@@ -206,25 +214,25 @@ sidecar-starter-pack/
206
214
### resources.py
207
215
208
216
| class `Resources()`| Description |
209
-
| --- | --- |
217
+
|:--- |:--- |
210
218
|`mark_coord()`|[BROKER] Marks (x, y, z) coordinate with specified label. |
211
-
<!--- | `sort_points()` | [BROKER] Sorts list of points (e.g., plants, weeds) based on specified criteria. | --->
212
219
|`sequence()`|[BROKER] Executes a predefined sequence. |
213
220
|`get_seed_tray_cell()`|[BROKER] Identifies and returns the location of specified cell in the seed tray. |
214
221
|`detect_weeds()`|[BROKER] Scans the garden to detect weeds. |
215
222
|`lua()`|[BROKER] Executes custom Lua code snippets to perform complex tasks or automations. |
216
223
|`if_statement()`|[BROKER] Performs conditional check and executes actions based on the outcome. |
217
224
|`assertion()`|[BROKER] Evaluates an expression. |
225
+
<!--- | `sort_points()` | [BROKER] Sorts list of points (e.g., plants, weeds) based on specified criteria. | --->
218
226
219
227
### tools.py
220
228
221
229
| class `ToolControls()`| Description |
222
-
| --- | --- |
223
-
<!--- | `verify_tool()` | [BROKER] Verifies if tool is mounted to UTM via tool verification pin and MOUNTED TOOL field in FarmBot’s state tree. | --->
230
+
| :--- | :--- |
224
231
|`mount_tool()`|[BROKER] Mounts the given tool and pulls it out of assigned slot. |
225
232
|`dismount_tool()`|[BROKER] Dismounts the currently mounted tool into assigned slot. |
226
233
|`water()`|[BROKER] Moves to and waters plant based on age and assigned watering curve. |
227
234
|`dispense()`|[BROKER] Dispenses user-defined amount of liquid in milliliters. |
235
+
<!--- | `verify_tool()` | [BROKER] Verifies if tool is mounted to UTM via tool verification pin and MOUNTED TOOL field in FarmBot’s state tree. | --->
0 commit comments