Skip to content

Commit

Permalink
Updated descriptions with badges
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliana Mashon authored and Juliana Mashon committed Aug 6, 2024
1 parent b4751d9 commit 22ae4ab
Showing 1 changed file with 55 additions and 58 deletions.
113 changes: 55 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,105 +59,102 @@ bot.get_token('email', 'password', 'server')

## :compass: Functions

> [!TIP]
> 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).
| Authentication | Description |
| :--- | :--- |
| `get_token()` | [API] Generate user authentication token using your email and password. Server is https://my.farm.bot by default. |
| `get_token()` | <a href="https://developer.farm.bot/v15/docs/web-app/rest-api.html"><img src="https://img.shields.io/badge/REST%20API-FF9500"/></a> Generate user authentication token using your email and password. Server is https://my.farm.bot by default. |

| Publishing | Description |
| :--- | :--- |
| `request()` | [API] Send requests to the API using various methods. |
| `publish()` | [BROKER] Publish messages containing CeleryScript via the message broker. |
| `request()` | <a href="https://developer.farm.bot/v15/docs/web-app/rest-api.html"><img src="https://img.shields.io/badge/REST%20API-FF9500"/></a> Send requests to the API using various methods. |
| `publish()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Publish messages containing CeleryScript via the message broker. |

> [!CAUTION]
> 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.
| Subscriptions | Description |
| :--- | :--- |
| `connect()` | [BROKER] Establish persistent connection with the message broker. |
| `disconnect()` | [BROKER] Disconnect from the message broker. |
| `start_listening()` | [BROKER] Establish persistent subscription to message broker channels. |
| `stop_listening()` | [BROKER] End subscription to all message broker channels. |
| `connect()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Establish persistent connection with the message broker. |
| `disconnect()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Disconnect from the message broker. |
| `start_listening()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Establish persistent subscription to message broker channels. |
| `stop_listening()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> End subscription to all message broker channels. |

| Basic Commands | Description |
| :--- | :--- |
| `wait()` | [BROKER] Pauses execution for a certain number of milliseconds. |
| `e_stop()` | [BROKER] Emergency locks (E-stops) the Farmduino microcontroller and resets peripheral pins to OFF. |
| `unlock()` | [BROKER] Unlocks a locked (E-stopped) device. |
| `reboot()` | [BROKER] |
| `shutdown()` | [BROKER] |
| `wait()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Pauses execution for a certain number of milliseconds. |
| `e_stop()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Emergency locks (E-stops) the Farmduino microcontroller and resets peripheral pins to OFF. |
| `unlock()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Unlocks a locked (E-stopped) device. |
| `reboot()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `shutdown()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |

| Camera | Description |
| :--- | :--- |
| `calibrate_camera()` | [BROKER] Performs camera calibration. This action will reset camera calibration settings. |
| `take_photo()` | [BROKER] Takes a photo using the device camera and uploads it to the web app. |
| `photo_grid()` | [BROKER] Returns metadata object about point grid required to perform a scan of the full garden. |
| `calibrate_camera()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Performs camera calibration. This action will reset camera calibration settings. |
| `take_photo()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Takes a photo using the device camera and uploads it to the web app. |
| `photo_grid()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Returns metadata object about point grid required to perform a scan of the full garden. |

| Information | Description |
| :--- | :--- |
| `get_info()` | [API] Get information about a specific endpoint. |
| `set_info()` | [API] Change information contained within an endpoint. |
| `safe_z()` |[API] Returns the highest safe point along the z-axis. |
| `garden_size()` | [API] Returns x-axis length, y-axis length, and area of garden bed. |
| `group()` | [API] Returns all group info or single by id. |
| `curve()` | [API] Returns all curve info or single by id. |
| `read_status()` | [BROKER] Returns the FarmBot status tree. |
| `read_sensor()` | [BROKER] |
| `get_info()` | <a href="https://developer.farm.bot/v15/docs/web-app/rest-api.html"><img src="https://img.shields.io/badge/REST%20API-FF9500"/></a> Get information about a specific endpoint. |
| `set_info()` | <a href="https://developer.farm.bot/v15/docs/web-app/rest-api.html"><img src="https://img.shields.io/badge/REST%20API-FF9500"/></a> Change information contained within an endpoint. |
| `safe_z()` |<a href="https://developer.farm.bot/v15/docs/web-app/rest-api.html"><img src="https://img.shields.io/badge/REST%20API-FF9500"/></a> Returns the highest safe point along the z-axis. |
| `garden_size()` | <a href="https://developer.farm.bot/v15/docs/web-app/rest-api.html"><img src="https://img.shields.io/badge/REST%20API-FF9500"/></a> Returns x-axis length, y-axis length, and area of garden bed. |
| `group()` | <a href="https://developer.farm.bot/v15/docs/web-app/rest-api.html"><img src="https://img.shields.io/badge/REST%20API-FF9500"/></a> Returns all group info or single by id. |
| `curve()` | <a href="https://developer.farm.bot/v15/docs/web-app/rest-api.html"><img src="https://img.shields.io/badge/REST%20API-FF9500"/></a> Returns all curve info or single by id. |
| `read_status()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Returns the FarmBot status tree. |
| `read_sensor()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |

> [!NOTE]
> Not sure which endpoint to access? [Find the list here](https://developer.farm.bot/v15/docs/web-app/api-docs).
| Jobs | Description |
| :--- | :--- |
| `get_job()` | [BROKER] <a href="https://developer.farm.bot/v15/docs/web-app/rest-api.html"><img src="https://img.shields.io/badge/REST%20API-FF9500"/></a> |
| `set_job()` | [BROKER] |
| `complete_job()` | [BROKER] |
| `get_job()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `set_job()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `complete_job()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |

| Messages | Description |
| :--- | :--- |
| `log()` | [API] |
| `message()` | [BROKER] |
| `debug()` | [BROKER] |
| `toast()` | [BROKER] |
| `log()` | <a href="https://developer.farm.bot/v15/docs/web-app/rest-api.html"><img src="https://img.shields.io/badge/REST%20API-FF9500"/></a> |
| `message()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `debug()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `toast()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |

| Movement | Description |
| :--- | :--- |
| `move()` | [BROKER] |
| `set_home()` | [BROKER] |
| `find_home()` | [BROKER] |
| `axis_length()` | [BROKER] |
| `get_xyz()` | [BROKER] |
| `check_position()` | [BROKER] |
| `move()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `set_home()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `find_home()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `axis_length()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `get_xyz()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `check_position()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |

| Peripherals | Description |
| :--- | :--- |
| `control_servo()` | [BROKER] |
| `control_peripheral()` | [BROKER] |
| `toggle_peripheral()` | [BROKER] |
| `on()` | [BROKER] |
| `off()` | [BROKER] |
| `control_servo()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `control_peripheral()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `toggle_peripheral()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `on()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `off()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |

| Resources | Description |
| :--- | :--- |
| `mark_point()` | [BROKER] |
| `sort_points()` | [BROKER] |
| `sequence()` | [BROKER] |
| `get_seed_tray_cell()` | [BROKER] |
| `soil_height()` | [BROKER] Use the camera to determine soil depth at the current location. |
| `detect_weeds()` | [BROKER] Take photo and detect weeds in the image. If detected, weed points will be created. |
| `lua()` | [BROKER] Send a message containing lua code via the message broker. |
| `if_statement()` | [BROKER] |
| `assertion()` | [BROKER] |
| `mark_point()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `sort_points()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `sequence()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `get_seed_tray_cell()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `soil_height()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Use the camera to determine soil depth at the current location. |
| `detect_weeds()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Take photo and detect weeds in the image. If detected, weed points will be created. |
| `lua()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Send a message containing lua code via the message broker. |
| `if_statement()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |
| `assertion()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> |

| Tools | Description |
| :--- | :--- |
| `verify_tool()` | [BROKER] Verifies if a tool is mounted to the UTM. |
| `mount_tool()` | [BROKER] Mounts given tool and pulls it out of slot. |
| `dismount_tool()` | [BROKER] Dismounts currently mounted tool into assigned slot. |
| `water()` | [BROKER] Moves to and waters the given plant. |
| `dispense()` | [BROKER] Dispenses the given amount of liquid in milliliters. |
| `verify_tool()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Verifies if a tool is mounted to the UTM. |
| `mount_tool()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Mounts given tool and pulls it out of slot. |
| `dismount_tool()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Dismounts currently mounted tool into assigned slot. |
| `water()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Moves to and waters the given plant. |
| `dispense()` | <a href="https://developer.farm.bot/v15/docs/message-broker"><img src="https://img.shields.io/badge/Message%20Broker-66BF34"/></a> Dispenses the given amount of liquid in milliliters. |

## :toolbox: Developer Info

Expand Down

0 comments on commit 22ae4ab

Please sign in to comment.