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

library format, content and packaging #1

Open
wassfila opened this issue Mar 24, 2021 · 3 comments
Open

library format, content and packaging #1

wassfila opened this issue Mar 24, 2021 · 3 comments

Comments

@wassfila
Copy link
Member

current code location
https://github.com/SuperPower/Artemis/tree/master/artemis-board/library%20and%20sample%20code

Example library packaging
https://github.com/ESP32Home/ESPNowWrapper

example usage project
https://github.com/ESP32Home/esp32_iot/tree/master/10_esp_now_mqtt_gateway

repo name :

  • artemis_library
  • apollo_library

Common lib

in Artemis project

#include <superpower.h>
superpower board = superpower("artemis");

in Apollo project

#include <superpower.h>
superpower board = superpower("apollo");

Separate lib

Option 1
in Artemis project

#include <superpower_artemis.h>
artemis board = artemis();

Option 2

#include <superpower_artemis.h>
supoerpower board = superpower();
@wassfila
Copy link
Member Author

wassfila commented Mar 24, 2021

sleep_minutes
sleep_seconds

sleep(255) => takes seconds =>returns error_ok
sleep(360) => takes minutes => returns error_ok
sleep(365) => makes rounding => returns error_time_rounded

@Tobi3566
Copy link
Contributor

Tobi3566 commented Mar 27, 2021

  • Public methods that could be added:
void set_int_pulsed(bool type); //enable / disable pulsed signal for timer interrupts
void set_alarm(byte minute); //alarm if minutes ==
void set_alarm(byte minute, byte hour); //alarm for hours & minutes ==
void set_alarm(byte minute, byte hour, byte day, bool weekday); // bool weekday for distinguishing between day of month / day of week
void set_alarm(byte minute, byte hour, byte day, byte weekday); //alarm for hours & minutes & day & weekday ==
void set_charging(bool state); //manually disable charging

also a possibility to use software I2C (given with constructor) would be useful for those who are not using espshield and want to use different pins

  • make get_EXP, set_EXP, config_EXP private because unused pins are not available

@Informaticore
Copy link
Contributor

@Tobi3566 whenever there will be a merge request for the code at some point I will add my 50cents about code there because I can reference line of code directly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants