GrovePi v0.3.2 GrovePi.Board View Source
Low-level interface for sending raw requests and receiving responses from a GrovePi hat. Create one of these first and then use one of the other GrovePi modules for interacting with a connected sensor, light, or actuator.
To check that your GrovePi hardware is working, try this:
iex> GrovePi.Board.firmware_version()
"1.2.2"
Link to this section Summary
Functions
Get the version of firmware running on the GrovePi’s microcontroller
Get a response to a previously send request to the GrovePi. This is not normally called directly
Write directly to a device on the I2C bus. This is used for sensors that are not controlled by the GrovePi’s microcontroller
Send a request to the GrovePi. This is not normally called directly except when interacting with an unsupported sensor
Link to this section Functions
firmware_version(atom) :: binary | {:error, term}
Get the version of firmware running on the GrovePi’s microcontroller.
get_response(integer) :: binary | {:error, term}
get_response(atom, integer) :: binary | {:error, term}
Get a response to a previously send request to the GrovePi. This is not normally called directly.
Write directly to a device on the I2C bus. This is used for sensors that are not controlled by the GrovePi’s microcontroller.
send_request(GenServer.server, binary) :: :ok | {:error, term}
Send a request to the GrovePi. This is not normally called directly except when interacting with an unsupported sensor.