Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Basic) support for Flow3r Badge (c3camp 2023) #368

Merged
merged 38 commits into from
Aug 23, 2024

Conversation

simonmicro
Copy link
Member

@simonmicro simonmicro commented Aug 17, 2023

https://flow3r.garden/

Well, this not only adds the (basic) hardware support, but also (consequently) enhances and migrates the platform-abstraction layer to accommodate for the new hardware...

Checklist / ToDo

  • Compile
  • First boot
  • Get display working (-> datasheet)
  • WiFi
  • Buttons (for now, just the standard ones (up, down, select))
  • Add accelerometer support (BMI270)
  • Add pressure support (BMP581)
    • ⚠️ This sensor is attached to the auxiliary I2C interface of the BMI270 - this significantly changes how to interact with that sensor, so direct I2C interface code cannot be used!
  • LEDs? (better if devs add it when needed; for now too unique on this platform; hint: FastLED)
  • Capacitive Touch? (better if devs add it when needed; for now too unique on this platform; hint: use the schematics and implement SPI driver for the GPIO extenders)
  • Get serial working properly over the jtag-serial interface (because the usb-c sidechannel requires a special cable)

Known Bugs

  • If the badge enters sleep, you have to reset it → sleep is blocked for now via OSW_PLATFORM_BLOCK_SLEEP
    • ...currently the accelerometer-interrupt is not working, so the badge won't wake up upon tap
    • ...buttons and interrupts... Maybe we can also use them?

@simonmicro simonmicro self-assigned this Aug 17, 2023
@simonmicro simonmicro changed the base branch from master to develop August 17, 2023 14:05
@schneider42
Copy link

Fails for me with:

Compiling .pio/build/FLOW3R_C3CAMP_2023/src/apps/OswAppDrawer.cpp.o
In file included from include/hal/devices.h:11,
                 from include/osw_hal.h:294,
                 from src/OswAppV2.cpp:1:
include/devices/bmi270.h:7:10: fatal error: bmi2_defs.h: No such file or directory

*******************************************************************
* Looking for bmi2_defs.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:bmi2_defs.h"
* Web  > https://registry.platformio.org/search?q=header:bmi2_defs.h
*
*******************************************************************

 #include <bmi2_defs.h>
          ^~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/FLOW3R_C3CAMP_2023/src/OswAppV2.cpp.o] Error 1
In file included from include/hal/devices.h:11,
                 from include/osw_hal.h:294,
                 from include/osw_ui.h:7,
                 from src/apps/OswAppDrawer.cpp:2:
include/devices/bmi270.h:7:10: fatal error: bmi2_defs.h: No such file or directory

*******************************************************************
* Looking for bmi2_defs.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:bmi2_defs.h"
* Web  > https://registry.platformio.org/search?q=header:bmi2_defs.h
*
*******************************************************************

 #include <bmi2_defs.h>
          ^~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/FLOW3R_C3CAMP_2023/src/apps/OswAppDrawer.cpp.o] Error 1

I did update the submodules

@schneider42
Copy link

I tried 72aa546 (before BIM270 support gets introduced) and that builds and runs in principle:
signal-2023-08-26-190722_002
signal-2023-08-26-190722_003
signal-2023-08-26-190722_004

I was able to connect to the AP it opened up, but couldn't connect to the IP displayed using various ports. I'm a first time user and haven't read the docs though :)

@schneider42
Copy link

Connecting it to my home WiFi and showing the current time works (modulo me not understanding the timezone field)

@simonmicro
Copy link
Member Author

Heyho, nice to hear!

So, regarding the missing header: Did you ensure to update and initialize the submodules? So, did you run git submodule sync; git submodule update --init? Otherwise, maybe I've missed adding the repo.

Regarding the web interface problems: Take a look into the platformio.ini header and remove the OSW_FEATURE_WIFI_APST feature flag (allow simultaneous station and client mode). I assume this is causing the ESP-IDF framework to mess up the connection. Now the UI should load... Right?

@simonmicro
Copy link
Member Author

Hey, I just pushed 71b8e18 - hopefully this fixes the broken submodule...

@simonmicro
Copy link
Member Author

Connecting it to my home WiFi and showing the current time works (modulo me not understanding the timezone field)

(inside the debug-app or inside the web-ui)?

Fixed invalid into-stack memory write (emulator.config.dropdown)
…erface!)

Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
…be serial-agnostic

Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
-> ESP-IDF has a bug, which renderes the webserver unuseable, if connected to an access-point at the same time
Signed-off-by: simonmicro <simon@simonmicro.de>
@simonmicro simonmicro merged commit 1b3851c into develop Aug 23, 2024
133 checks passed
@simonmicro simonmicro deleted the feature/flow3r_badge branch August 23, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants