No description
- C++ 100%
| .vscode | ||
| include | ||
| lib | ||
| src | ||
| test | ||
| .gitignore | ||
| platformio.ini | ||
| README.md | ||
Abserver_arduino
Arduino code made to work with abserver_rpi project
Hardware
Original project board - Arduino nano (Atmega328P)
Drivers - DRV8825/A4988
Soldered on breadboard, but PCB Coming Soon!
API
Commands are sent over serial port at 115200 baud rate.
You can change baud rate by your preference, but 115200 is the fastest baud rate with 30cm cable that is stable, and is not slow enough to be noticeable.
API is made using ArduinoJson library.
Sample message:
{"n" : *action_name*, "p": *action_params*}
action_name- name from list of possible actionsaction_params- params for a certain action also from list of possible actions
Actions list
Developement stages:
- 🌑 - not implemented, but planned
- 🌗 - implemented, but not finalized and tested
- 🌕 - implemented and tested
| Command | Description | Impl. status | Params |
|---|---|---|---|
ping |
Returns pong and firmware version |
🌕 | None |
moveto |
Aims telescope at given cordinates | 🌗 | ->🌌<- |
move |
Aims telescope at relative cordinates | 🌕 | ->🌌<- |
track |
Starts compensating for earth rotation at set position | 🌗 | ->🌌<- |
config |
Used for parameters configuration | 🌗 | ->🌌<- |
stop |
Stops all steppers | 🌕 | None |
Ping
- Returns arduino firmware version to check the compitability of APIs
Response:
{"type": "pong", "vesrion": *firmware version*}
MoveTo
Params:
"ha"- Hour Angle of an object"dec"- Declination of an nedeed object
Example:
{"n": "moveTo", "p": {"dec": 35.5}}
Move
Params:
"decDiff"- the declination angle you you want to move your telescope on"haDiff"- the hour angle you want to move your telescope on
Example:
{"n": "move", "p": {"decDiff": 10}}
Track
Params:
"t"- Time to automatically stop tracking
Example:
{"n": "track", "p": {"t": 500}}
Config
Params:
"reportFrequency": float- Report frequency for the status message. High frequencies can interrupt tracking. Will be fixed in future updates.
Example:
{"n": "config", "p": {"reportFrequency": 0.25}} //Every 4 seconds