how can i place this in one program or flash this in the spark core? i am creating a project in this order.
mini-push button program (library)
RGB LED
Tiny gps (library)
the mini-push button needs to be pressed for 5-seconds then the LED will be blinking green at the same time the tinyGPS library will be on and functioning at this time. its like putting the spark core into sleep before anything else to save power and when pressed the spark core will connect to the internet.
Here’s some pointers that will hopefully get you started:
you can sleep the core and wake up on interrupt using the Spark.sleep function. So connect your mini-push button to a pin to wake up the core.
when the core wakes up, check the mini-push button is pressed for 5 seconds and then set the rgb led color using RGB.color() and RGB.control, and make a call to the tiny gps library.