Uploaded February 2026 | Updated September 2026, 3 weeks ago
The code for the accelerometer lesson in the Grove Beginner Kit for Arduino User Manual doesn't work with the library that they ask you to download. In this video, I go through the process of troubleshooting and end up with a 3D box in TouchDesigner that moves in response to the movement of the Grove board.
FYI I use the x, y, and z values from the accelerometer for the x, y, and z rotation values for the 3D box, but that doesn't really work. The Z axis for the accelerometer responds to moving the board up and down, so it doesn't really help rotate the box. Leave that variable off and you'll see that it still responds in a pleasing way.
In case you have a hard time reading it, here's the python code that I type in the "serial1_callbacks" operator:
```
def onReceive(dat, rowIndex, message, byteData):
x, y, z = message.split(",")
op('constant1').par.const0value = x
op('constant1').par.const1value = y
op('constant1').par.const2value = z
return
```
The code for the accelerometer lesson in the Grove Beginner Kit for Arduino User Manual doesn't work with the library that they ask you to download. In this video, I go through the process of troubleshooting and end up with a 3D box in TouchDesigner that moves in response to the movement of the Grove board.
FYI I use the x, y, and z values from the accelerometer for the x, y, and z rotation values for the 3D box, but that doesn't really work. The Z axis for the accelerometer responds to moving the board up and down, so it doesn't really help rotate the box. Leave that variable off and you'll see that it still responds in a pleasing way.
In case you have a hard time reading it, here's the python code that I type in the "serial1_callbacks" operator:
```
def onReceive(dat, rowIndex, message, byteData):
x, y, z = message.split(",")
op('constant1').par.const0value = x
op('constant1').par.const1value = y
op('constant1').par.const2value = z
return
```










