GithubHelp home page GithubHelp logo

kongduino / bastwan_timed_wakeup Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.79 MB

An example demonstrating the usage of the LowPower library on BastWAN

C++ 100.00%
bastwan lora lowpower deepsleep

bastwan_timed_wakeup's Introduction

BastWAN_Timed_Wakeup

An example demonstrating the usage of the ArduinoLowPower library on BastWAN. It is using the ElectronicCats port of the ArduinoLowPower library, and is based on the TimedWakeup example.

When using this example, you need to set the clock source as 32KHZ_CRYSTAL, as shown below:

Clock Source

Setup

The main line of code here is:

  LowPower.attachInterruptWakeup(RTC_ALARM_WAKEUP, dummy, CHANGE);

Where dummy is a function that will be called on wakeup. Here we'll just increment a counter, for the LoRa packet that will be sent.

void dummy() {
  // This function will be called once on device wakeup
  // You can do some small operations here (like changing variables that will be used in the loop)
  // Remember to avoid calling delay() and long running functions since this function executes in the interrupt context
  count++;
}

The in loop() we will send a small packet with the count updated, and go back to sleep with LowPower.sleep(30000);. That's it!

Msg_Menu

The BastMobile only displays a few characters of the incoming message.

Packet_6

But you have the full message here in the individual message view.

bastwan_timed_wakeup's People

Contributors

kongduino avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.