diff --git a/hardware/sensehat/README.md b/hardware/sensehat/README.md index f286ad8b..043d9dae 100644 --- a/hardware/sensehat/README.md +++ b/hardware/sensehat/README.md @@ -71,7 +71,9 @@ Joystick events are sent when the Sense HAT joystick is interacted with. The This node sends commands to the 8x8 LED display on the Sense HAT. Commands are sent to the node in `msg.payload`. Multiple commands can -be sent in a single message by separating them with newline (\n) characters. +be sent in a single message by separating them with newline (\n) characters. +You must use a function node or a change node (jsonata expression) when +using the newline (\n) character to create a payload containing multiple commands. #### Set the colour of individual pixels @@ -103,12 +105,16 @@ Format: `R` `angle` must be 0, 90, 180 or 270. +Example: `R180` + #### Flip the screen -Format: `R` +Format: `F` `axis` must be either `H` or `V` to flip on the horizontal or vertical axis respectively. +Example: `FV` + #### Scroll a message If `msg.payload` is not recognised as any of the above commands, it is treated @@ -128,3 +134,5 @@ The following message properties can be used to customise the appearance: Format: `D` `level` must be 0 (low) or 1 (high). + +Example: `D1` diff --git a/hardware/sensehat/sensehat.html b/hardware/sensehat/sensehat.html index a7ec2d1e..25091b7a 100644 --- a/hardware/sensehat/sensehat.html +++ b/hardware/sensehat/sensehat.html @@ -73,7 +73,9 @@ is an object with the following values:

Raspberry Pi Sense HAT output node.

This node sends commands to the 8x8 LED display on the Sense HAT.

Commands are sent to the node in msg.payload. Multiple commands can -be sent in a single message by separating them with newline (\n) characters.

+be sent in a single message by separating them with newline (\n) characters. You must +use a function node or a change node (jsonata expression) when using the newline (\n) +character to create a payload containing multiple commands.

Set the colour of individual pixels

Format: <x>,<y>,<colour> @@ -100,11 +102,13 @@ be sent in a single message by separating them with newline (\n) characters.

Rotate the screen

Format: R<angle>

angle must be 0, 90, 180 or 270.

+

Example: R180

Flip the screen

Format: F<axis>

axis must be either H or V to flip on the horizontal or vertical axis respectively.

+

Example: FV

Scroll a message

If msg.payload is not recognised as any of the above commands, @@ -121,6 +125,7 @@ To scroll a single character, append a blank space after it - "A ".

Set the screen brightness

Format: D<level>

level must be 0 (low) or 1 (high).

+

Example: D1