![background image](http://html.mh-extra.com/html/sparkfun/micromod-dev-18575/micromod-dev-18575_hook-up-manual_1339615025.webp)
/******************************************************************************
WRITTEN BY: Ho Yun "Bobby" Chan
@ SparkFun Electronics
DATE: 10/19/2021
GITHUB REPO: https://github.com/sparkfun/SparkFun_MicroMod_Main_Board_Double
DEVELOPMENT ENVIRONMENT SPECIFICS:
Firmware developed using Arduino IDE v1.8.12
========== DESCRIPTION==========
This example code toggles the Function Board's AP2112 3.3V voltage
regulator's enable pin. The Function Boards built-in power LED should blink.
This example is based on Arduino's built-in Blink Example:
https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
Note that this example code uses the MicroMod Main Board - Double. The MicroMod
Main Board - Single routes the PWR_EN0 pin slightly different for the
function board.
========== HARDWARE CONNECTIONS ==========
MicroMod Artemis Processor Board => MicroMod Main Board - Double => Function Boards
Feel like supporting open source hardware?
Buy a board from SparkFun!
MicroMod Artemis Processor Board - https://www.sparkfun.com/products/16401
MicroMod Main Board - Double - https://www.sparkfun.com/products/18576
MicroMod Environmental Function Board - https://www.sparkfun.com/products/18632
LICENSE: This code is released under the MIT License (http://opensource.org/licenses/MIT)
******************************************************************************/
/*Define the power enable pins for the processor board with SDIO_DATA2.
Depending on the processor board, the Arduino pin may be different.
Note: Certain Processor Boards like the Artemis have more than one pin available
to control the Function Board's voltage regulator (e.g. SDIO_DATA2 and G5).
SAMD51, ESP32, and STM32 Processor Board pins do not have SDIO Data 2, so
users will need to reference the Processor Pin G5. Below are a few examples. */
//ARTEMIS
#define PWR_EN0 4 //Function Board 0's "PWR_EN0" pin <= MicroMod SDIO_DATA2 => Artemis Proces
sor Board (D4)
#define PWR_EN1 26 //Function Board 1's "PWR_EN1" pin <= MicroMod SDIO_DATA1 => Artemis Proces
sor Board (D26)
//Alternative option that does the same thing. Make sure to just choose one for PWR_EN0 and PWR_
EN1
//#define PWR_EN0 29 //Function Board 0's "PWR_EN0" pin <= MicroMod G5 => Artemis Processor Bo
ard (A29)
//#define PWR_EN1 14 //Function Board 1's "PWR_EN0" pin <= MicroMod G6 => Artemis Processor Bo
ard (D14)