Commit Graph

4 Commits

Author SHA1 Message Date
Grigorii Merkushev
8700af8a24
Fine tuning for esp32s3 (#143)
- exposed strain SCK and DO
- use 12 bit PWM (instead of 16 bit) for screen brightness on s3
- added option to use uart serial for s3
- bump nanopb/Nanopb @ 0.4.7
- fixed SPI bus alias and DMA channel for s3

---------

Co-authored-by: Scott Bezek <scottbez1@gmail.com>
2023-11-13 22:42:44 -08:00
Scott Bezek
ae28d523e0
Protobuf serial protocol (#101)
- Firmware
  - Refactor all code to use a log interface rather than `Serial` directly
  - Moved platformio.ini to root, so you can load the entire repo in VS Code and still use platformio
  - Reduced graphic buffer bit depth to 8 bits (short on RAM :( )
  - Implemented threadsafe log interface in interface_task (using a queue for posting log message)
  - Created serial protocol interface and 2 implementations - plaintext (default) and protobuf (selected by sending a NULL byte)
  - Protobuf protocol is roughly the same architecture as Splitflap's:
    - PacketSerial (cobs) framing with NULL delimiters
    - CRC32 checksums for packets
    - nanopb generated code for encoding/decoding (generated firmware code is checked in, since it should change less frequently and this reduces burden to build the project from scratch)
- Software
  - Typescript example host-side code:
    - smartknobjs-proto
      - Autogenerated types/encoding/decoding protobuf code (using protobufjs)
    - smartknobjs
      - Helper library for interfacing the with smartknob via serial/protobuf. Implements basic outgoing queue (with retries and ACK checking) and message callback for responding to messages from the SmartKnob
    - example
      - Basic demo CLI app that uses smartknobjs to connect to the smartknob, send a haptic config, and print state changes and log messages to the console
2022-10-22 17:27:35 -07:00
Scott Bezek
45fd9f4e3e Cleanup old pio envs, fix some compilation issues with compile flags
Removed some legacy platformio envs that are not actively being maintained. But also fixed some bugs with different build flags that caused compilation issues.

Fixes #49
2022-04-06 21:53:41 -07:00
Scott Bezek
b47fcf7da4
Firmware updates - sensors, calibration, View support, etc (#9)
- Modify TLV493d library to expose frame counter in order to check for lockup, and implement auto-reset in tlv_sensor in case of lockup
 - Implement MT6701 SimpleFOC sensor
 - Make display optional
 - Add optional LED, strain, ALS support
 - Connect ALS to LED and display brightness
 - Hardcoded strain gauge thresholds and haptic feedback
2022-03-10 19:05:49 -08:00