Controller board

Introduction

Controller board top view
Controller board top view
Controller board bottom view
Controller board bottom view
  • General Purpose Input Out (GPIO)
  • Digital-to-Analog Converter (DAC)
  • Analog-to-Digital Converter (ADC)
  • Power Width Modulation (PWM)
  • Save/load configuration to/from internal nonvolatile memory
  • DIY friendly design

Pin function map
Pin function map
compatible hardware version1.*
firmware version1.0
USB portmicro-B
Serial port speed115200
USB voltage5V
USB current100mA
GPIO voltage3.3V

GUI

This device has a graphical control panel

Open control panel

Examples

If you are not sure how to connect to your device, you can follow this Getting Started page.

Set GPIO value
    
> write gpio.1.mode=ouput
> write gpio.1.value=1

To update the GPIO pin value, first set the GPIO mode to be outoput and then update the pin value to be the desired value.

Read GPIO value
    
> write gpio.1.mode=input
> read gpio.1.value

To read the GPIO pin value, set the GPIO mode to be input and then read pin value.

Read ADC input value
    
> write adc.1.mode=on
> read adc.1.value

Turn on the Analog-to-Digital Converter (ADC) on pin 1 and then read the converted digital value of the voltage on pin 1. The allowed voltage range on an ADC pin should be from 0V to 3.3V

Analog output by DAC
    
> write dac.11.mode=on
> write dac.11.value=1000

Turn on the Digital-to-Analog Converter (DAC) on pin 11. Write the output value to the DAC. The DAC will convert the given digital value to a voltage in the range from 0V to 3.3V on the pin 11. The range of the digital value should be from 0 to 4095.

Set PWM output
    
> write pwm1.period=1024
> write pwm1.prescaler=1
> write pwm1.1.duty=0.5
> write pwm1.1.mode=on

pwm1.period defines the period counter of PWM 1. pwm1.prescale is the prescaler of the PWM 1 clock. The period of output wave is defined by both the period counter and the prescaler. pwm1.1.duty=0.5 makes the output wave 50% high and 50% low. Finally, turn on the output on pin 1 by setting the mode to be on

Save current configuration
    
> write config.save

Save the current configuration on all pins to internal nonvolatile memory. The saved configuration will be automatically loaded on next power up.

Load saved configuration
    
> write config.load

Load the previously saved configuration and apply the configuration to all pins.

Commands

Write

Write to the GPIO pin logic value.

> write gpio.[gpio_pins].value={bool}

[gpio_pins] should be in the range of [1, 16].

The input data type isbool.

Write to the GPIO I/O mode.

> write gpio.[gpio_pins].mode={enum}

[gpio_pins] should be in the range of [1, 16].

The input data type isenum.

The value of {enum} should be one of {input, output}.

Write to the digital output value of the Digital-Analog-Converter (DAC).

> write dac.[dac_pin].value={uint}

[dac_pin] is {11}.

The input data type isuint.

The value range of this property is [0, 4095].

Write to the DAC mode of on/off.

> write dac.[dac_pin].mode={bool}

[dac_pin] is {11}.

The input data type isbool.

Write to the ADC mode of on/off.

> write adc.[adc_pin].mode={bool}

[adc_pin] is one of {1, 2, 9, 10, 11, 12, 13, 14, 15, 16}.

The input data type isbool.

Write to the PWM 1 period counter.

> write pwm1.period={uint}

The input data type isuint.

The value range of this property is [1, 4294967295].

Write to the PWM 1 period prescaler.

> write pwm1.prescaler={uint}

The input data type isuint.

The value range of this property is [1, 65535].

Write to the PWM 1 output duty percentage.

> write pwm1.[pwm1_pin].duty={float}

[pwm1_pin] is one of {1, 2, 9, 10}.

The input data type isfloat.

The value range of this property is [0, 1].

Write to the PWM 1 mode of on/off.

> write pwm1.[pwm1_pin].mode={bool}

[pwm1_pin] is one of {1, 2, 9, 10}.

The input data type isbool.

Write to the PWM 2 period counter.

> write pwm2.period={uint}

The input data type isuint.

The value range of this property is [1, 65535].

Write to the PWM 2 period prescaler.

> write pwm2.prescaler={uint}

The input data type isuint.

The value range of this property is [1, 65535].

Write to the PWM 2 output duty percentage.

> write pwm2.[pwm2_pin].duty={float}

[pwm2_pin] is one of {13, 14}.

The input data type isfloat.

The value range of this property is [0, 1].

Write to the PWM 2 mode of on/off.

> write pwm2.[pwm2_pin].mode={bool}

[pwm2_pin] is one of {13, 14}.

The input data type isbool.

Write to the switch of saving current configuration.

> write config.save={bool}

The input data type isbool.

The default value of config.save is True. > write config.save is equivalent to > write config.save=True

Save the current configuration of all pins to internal nonvolatile memory. The save config will be automatically loaded and applied at power up.

Write to the switch of loading previously saved configuration.

> write config.load={bool}

The input data type isbool.

The default value of config.load is True. > write config.load is equivalent to > write config.load=True

Load previously saved configuration and apply the configuration to pins.

Write to the switch of resetting configuration to default value.

> write config.reset={bool}

The input data type isbool.

The default value of config.reset is True. > write config.reset is equivalent to > write config.reset=True

Reset the saved configuration to its default value.

Write to the name of the device.

> write device.name={string}

The input data type isstring.

The length of the {string} should be less than 16.

Write to the switch of restarting the device.

> write device.restart={bool}

The input data type isbool.

The default value of device.restart is True. > write device.restart is equivalent to > write device.restart=True

Read

Read the GPIO pin logic value.

> read gpio.[gpio_pins].value

[gpio_pins] should be in the range of [1, 16].

The output data type is bool.

Read the GPIO I/O mode.

> read gpio.[gpio_pins].mode

[gpio_pins] should be in the range of [1, 16].

The output data type is enum.The value can be one of {input, output}.

Read the digital output value of the Digital-Analog-Converter (DAC).

> read dac.[dac_pin].value

[dac_pin] is {11}.

The output data type is uint.

The value range of this property is [0, 4095].

Read the DAC mode of on/off.

> read dac.[dac_pin].mode

[dac_pin] is {11}.

The output data type is bool.

Read the the digital input value of the Analog-Digital-Converter (ADC).

> read adc.[adc_pin].value

[adc_pin] is one of {1, 2, 9, 10, 11, 12, 13, 14, 15, 16}.

The output data type is uint.

Read the ADC mode of on/off.

> read adc.[adc_pin].mode

[adc_pin] is one of {1, 2, 9, 10, 11, 12, 13, 14, 15, 16}.

The output data type is bool.

Read the PWM 1 period counter.

> read pwm1.period

The output data type is uint.

The value range of this property is [1, 4294967295].

Read the PWM 1 period prescaler.

> read pwm1.prescaler

The output data type is uint.

The value range of this property is [1, 65535].

Read the PWM 1 output duty percentage.

> read pwm1.[pwm1_pin].duty

[pwm1_pin] is one of {1, 2, 9, 10}.

The output data type is float.

The value range of this property is [0, 1].

Read the PWM 1 mode of on/off.

> read pwm1.[pwm1_pin].mode

[pwm1_pin] is one of {1, 2, 9, 10}.

The output data type is bool.

Read the PWM 2 period counter.

> read pwm2.period

The output data type is uint.

The value range of this property is [1, 65535].

Read the PWM 2 period prescaler.

> read pwm2.prescaler

The output data type is uint.

The value range of this property is [1, 65535].

Read the PWM 2 output duty percentage.

> read pwm2.[pwm2_pin].duty

[pwm2_pin] is one of {13, 14}.

The output data type is float.

The value range of this property is [0, 1].

Read the PWM 2 mode of on/off.

> read pwm2.[pwm2_pin].mode

[pwm2_pin] is one of {13, 14}.

The output data type is bool.

Read the URL to the Exaberry.org.

> read device.exaberry

The output data type is string.

Read the URL to the documentation.

> read device.documentation

The output data type is string.

Read the name of the device.

> read device.name

The output data type is string.

You can customize the device name by writing to this property.

Read the system ticks since powered up.

> read device.systick

The output data type is uint.

The systick is approximately the number of microseconds since power up.

Read the device ID.

> read device.id

The output data type is hex.

The device ID is unique for each device.

Read the type ID of the device.

> read device.type_id

The output data type is string.

The type ID is unique for different API and hardware design combination.

Read the firmware version.

> read device.firmware.version

The output data type is string.

Read the hardware version.

> read device.hardware.version

The output data type is string.

Hardware

Dimensions

dimension image
A:18.8mm
B:31.4mm
C:11.8mm
D:2.54mm

Firmware

The Firmware flashing page documents the steps for downloading the firmware to the device.

Links