Expansion Port

CEEv1.0 currently exposes four digital input-output pins via the "Expansion" header. These pins comprise all of the ATXMEGA32A4U's PORTE, and offer hardware support for I2C, SPI, and basec 3.3v input/output.

Connect version 1.3 exposes a basic API for making use of the input/output functionality of these pins, allowing easy use with relays, switches, LEDs, and other similar simple apparatus.

To use this, first update the firmware on your CEE to 1.3. This is largley untested, but only differs from 1.2 by the addition of two vendor requests, one for each output and input.

To update the firmware, navigate to fwupdate?image=cee_1.0/fw_1.3a.json and follow the instructions.

To make use of this functionality, run the following command to set all pins to output and set all pins high.

curl http://localhost:9003/rest/v1/devices/com.nonolithlabs.cee*/gpio -dout=15 -ddir=15

or, from python:

import connectClient
cee = connectClient.CEE()
cee.setGPIO(direction=0xF, state=0b00001111)

this will return

{u'status': 3, u'out': 15, u'dir': 15, u'in': 15}

indicating that all pins are set to voltage = high ('out',) direction = out ('dir',) and tell you that all pins are actually high('in'.)