Example Code for Arduino
This article describes the usage method of μHex and the location of its library in the Arduino library.
Programming
The board type of uHex is same to Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328, you could select it in the board menu, and program it with FTDI programmer. (Note: The bootloader of uHex is different from Arduino Pro or Pro Mini one. Please don't update bootloader by this one.)

Low power Consumption Application
Please download the Arduino library microPoly Library first.
Wake up by Interrupt
Code: pinTrigger.ino
Function: The uHex is in sleep state until pin2=LOW and pin3=HIGH. Once waked, the LED on the board will flash for some seconds and then go to sleep again.
Wake up by Timer
Code: timerTrigger.ino
Function:The uHex is waked by period timer (using watchdog timer). Once waked, the LED on the board will flash for some seconds and then go to sleep again.
Integrated Application
Code: measure.ino
Function:
The uHex is in sleep state until Timer is overtime or Button is pressed
The uHex sample data every 1 minute. If button is pressed the average data will be display on the LCD screen. After some seconds, it will go to sleep again.
General Application
In the scope of uHex ports, the program from Arduino UNO/Pro Mini can be run on the uHex.
Was this article helpful?
