Skip to content

Commit f3d558f

Browse files
Juliana MashonJuliana Mashon
Juliana Mashon
authored and
Juliana Mashon
committed
Updated README
1 parent 550574c commit f3d558f

File tree

1 file changed

+15
-20
lines changed

1 file changed

+15
-20
lines changed

README.md

+15-20
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ python3 -m pip install paho-mqtt
4242
```
4343

4444
## :seedling: Getting Started
45-
Import `main.py` and create an instance of the Farmbot class:
46-
```
47-
from main.py import Farmbot
48-
bot = Farmbot()
49-
```
5045

5146
### Get your authentication token
5247
To generate your authentication token and get started:
@@ -69,37 +64,40 @@ bot.get_token('email', 'password', 'server')
6964
> Functions marked with [API] communicate with the Farm Designer web app via the [REST API](https://developer.farm.bot/v15/docs/web-app/rest-api.html) and those marked with [BROKER] communicate with the FarmBot via the [message broker](https://developer.farm.bot/v15/docs/message-broker).
7065
7166
| Authentication | Description |
72-
| --- | --- |
67+
| :--- | :--- |
7368
| [API] `get_token()` | Generate user authentication token using your email and password. Server is https://my.farm.bot by default. |
7469

7570
| Publishing | Description |
76-
| --- | --- |
71+
| :--- | :--- |
7772
| [API] `request()` | Send requests to the API using various methods. |
7873
| [BROKER] `publish()` | Publish messages containing CeleryScript via the message broker. |
7974

75+
> [!CAUTION]
76+
> Making requests other than `GET` to the API will permanently alter the data in your account. `DELETE` and `POST` requests may destroy data that cannot be recovered. Altering data through the API may cause account instability.
77+
8078
| Subscriptions | Description |
81-
| --- | --- |
79+
| :--- | :--- |
8280
| [BROKER] `connect()` | Establish persistent connection with the message broker. |
8381
| [BROKER] `disconnect()` | Disconnect from the message broker. |
8482
| [BROKER] `start_listening()` | Establish persistent subscription to message broker channels. |
8583
| [BROKER] `stop_listening()` | End subscription to all message broker channels. |
8684

8785
| Basic Commands | Description |
88-
| --- | --- |
86+
| :--- | :--- |
8987
| [BROKER] `wait()` | Pauses execution for a certain number of milliseconds. |
9088
| [BROKER] `e_stop()` | Emergency locks (E-stops) the Farmduino microcontroller and resets peripheral pins to OFF. |
9189
| [BROKER] `unlock()` | Unlocks a locked (E-stopped) device. |
9290
| [BROKER] `reboot()` | description |
9391
| [BROKER] `shutdown()` | description |
9492

9593
| Camera | Description |
96-
| --- | --- |
94+
| :--- | :--- |
9795
| [BROKER] `calibrate_camera()` | Performs camera calibration. This action will reset camera calibration settings. |
9896
| [BROKER] `take_photo()` | Takes a photo using the device camera and uploads it to the web app. |
9997
| [BROKER] `photo_grid()` | Returns metadata object about point grid required to perform a scan of the full garden. |
10098

10199
| Information | Description |
102-
| --- | --- |
100+
| :--- | :--- |
103101
| [API] `get_info()` | Get information about a specific endpoint. |
104102
| [API] `set_info()` | Change information contained within an endpoint. |
105103
| [API] `safe_z()` | Returns the highest safe point along the z-axis. |
@@ -109,27 +107,24 @@ bot.get_token('email', 'password', 'server')
109107
| [BROKER] `read_status()` | Returns the FarmBot status tree. |
110108
| [BROKER] `read_sensor()` | description |
111109

112-
> [!CAUTION]
113-
> Making requests other than `GET` to the API will permanently alter the data in your account. `DELETE` and `POST` requests may destroy data that cannot be recovered. Altering data through the API may cause account instability.
114-
115110
> [!NOTE]
116111
> Not sure which endpoint to access? [Find the list here](https://developer.farm.bot/v15/docs/web-app/api-docs).
117112
118113
| Jobs | Description |
119-
| --- | --- |
114+
| :--- | :--- |
120115
| [BROKER] `get_job()` | description |
121116
| [BROKER] `set_job()` | description |
122117
| [BROKER] `complete_job()` | description |
123118

124119
| Messages | Description |
125-
| --- | --- |
120+
| :--- | :--- |
126121
| [API] `log()` | description |
127122
| [BROKER] `message()` | description |
128123
| [BROKER] `debug()` | description |
129124
| [BROKER] `toast()` | description |
130125

131126
| Movement | Description |
132-
| --- | --- |
127+
| :--- | :--- |
133128
| [BROKER] `move()` | description |
134129
| [BROKER] `set_home()` | description |
135130
| [BROKER] `find_home()` | description |
@@ -138,15 +133,15 @@ bot.get_token('email', 'password', 'server')
138133
| [BROKER] `check_position()` | description |
139134

140135
| Peripherals | Description |
141-
| --- | --- |
136+
| :--- | :--- |
142137
| [BROKER] `control_servo()` | description |
143138
| [BROKER] `control_peripheral()` | description |
144139
| [BROKER] `toggle_peripheral()` | description |
145140
| [BROKER] `on()` | description |
146141
| [BROKER] `off()` | description |
147142

148143
| Resources | Description |
149-
| --- | --- |
144+
| :--- | :--- |
150145
| [BROKER] `mark_point()` | description |
151146
| [BROKER] `sort_points()` | description |
152147
| [BROKER] `sequence()` | description |
@@ -158,7 +153,7 @@ bot.get_token('email', 'password', 'server')
158153
| [BROKER] `assertion()` | description |
159154

160155
| Tools | Description |
161-
| --- | --- |
156+
| :--- | :--- |
162157
| [BROKER] `verify_tool()` | Verifies if a tool is mounted to the UTM. |
163158
| [BROKER] `mount_tool()` | Mounts given tool and pulls it out of slot. |
164159
| [BROKER] `dismount_tool()` | Dismounts currently mounted tool into assigned slot. |

0 commit comments

Comments
 (0)