New Z-Uno software release 2.0.8
February 28, 2017
We are happy to announce a new Z-Uno release! This software update of Z-Uno fixes some issues from 2.0.7 version and brings many new features to your Z-Uno.
What's new in 2.0.8?
New examples added (can be found in File→Examples→Z-Uno in Arduino IDE):
- Interrupts example
- LPS331 pressure sensor example
- AM2320 temperature and humidity sensor example
- PN532 NFC/RFID reader example
New features:
- External interrupts of the Z-Wave chip: INT0 (pin 17), INT1 (pin 18), ZEROX (pin 3). Interrupt handler should be defined in global range via ZUNO_SETUP_ISR_*(isr_handler), where isr_handler is the name of the corresponding function to call on interrupt.
- ZUNO_SETUP_ISR_INT0(int0_handler)
- ZUNO_SETUP_ISR_INT1(int1_handler)
- ZUNO_SETUP_ISR_ZEROX(int_zeroX_handler)
Trigger mode is defined using function zunoExtIntMode(byte int_num, byte mode). Allowed values are for int_num are:- ZUNO_EXT_INT0
- ZUNO_EXT_INT1
- ZUNO_EXT_ZEROX
- CHANGE (value change)
- FALLING (high to low falling)
- RISING (low to high rising)
- General Purpose Timer (GPT) is now available. interrupt handler can be set via ZUNO_SETUP_ISR_GPTIMER(gpt_handler), where gpt_handler - is the handler function name (like for interrupts handlers). Timer is configured using the following functions:
- zunoGPTInit(byte flags) — set timer mode:
- ZUNO_GPT_SCALE1024 — specify tick frequency as 32MHZ/1024, otherwise default 4MHZ is used.
- ZUNO_GPT_IMWRITE — write new value immediately instead of waiting for timer to reach zero
- ZUNO_GPT_CYCLIC — reload the timer on reaching zero — otherwise timer triggers only once
- zunoGPTEnable(byte bEnable) — enable/disable timer
- zunoGPTSet(word interval) — defines the number of ticks before interrupt happens.
- zunoGPTInit(byte flags) — set timer mode:
- New 1 ms timer. Unlike GPT, this timer is not so accurate, but have no restrictions on PWM. Defined using ZUNO_SETUP_ISR_1MSTIMER(m1ms_handler)
- ADC (analogRead) resolution can be changed using function analogReadResolution(byte resolution). Resolution can be in range 1-12 bits. Most popular are:
- 10 bits (default) — Arduino Uno compatibility mode
- 12 bits — maximum possible in Z-Uno
- 8 bits — can save energy in battery devices (uses special mode of Z-Wave MCU to make ADC faster)
- Possibility to choose Reference for ADC using analogReference(byte ref). Possible values are (bitmask flags)::
- ADC_HIGH_EXTERNAL — use A0 pin as upper reference voltage
- ADC_HIGH_INTERNAL — use internal voltage reference 1.2 V as upper reference voltage (NB! there might be a ±10% drift from Z-Uno to Z-Uno, but constant for a particular Z-Uno!)
- ADC_HIGH_VCC — use Vcc as upper reference voltage (default)
- ADC_LOW_EXTERNAL — use A1 pin as lower reference voltage
- ADC_LOW_GND — use GND as lower reference voltage (default)
- Pre-defined (Arduino-like) values:
- DEFAULT = (ADC_HIGH_VCC | ADC_LOW_GND)
- INTERNAL = (ADC_HIGH_INTERNAL | ADC_LOW_GND)
- EXTERNAL = (ADC_HIGH_EXTERNAL | ADC_LOW_GND)
- Possibility to define PWM resolution using function analogWriteResolution(byte res). Resolution can be in range 1-16 bits. Most popular:
- 8 — like in Arduino Uno (default)
- 16 — maximal possible in Z-Uno
- Libraries
- New library ZUNO_AM2030 temperature & humidity AM2030 I2C sensor.
- New library ZUNO_PN532 NXP PN532 I2C NFC/RFID sensor.
- New library ZUNO_LPS3310 LPS3310 I2C pressure sensor.
Fixes:
- Error that lead to Z-Uno being unreachable after new sketch load (reset was required).
- Problems with ADC wrong errors and input resistance (pullup was accidentelly turned on).
- Problems with data loss on UART1/UART0 on speed bigger than 9.6 kbps. UART reworked to use buffering and MCU facilities (DMA).
- Problems with pins 17-23 being changed on Z-Wave packet send.
- Failed I2C communication with Arduino and other MCUs.
Improvements:
- IR input buffer size rised from 200 to 300 bytes - now IR commands up to 9 bytes can be captured (used by most A/C remotes).
- Allowed to use delay() in setup(). This call is blocking.
This new C++ release is available under http://z-uno.z-wave.me/files/z-uno/package_z-wave.me_index.json URL (follow instructions).
Documentation on Z-Uno web site was also revised and updated to host new functions description.