User Manual

123
if g > 32767:
g -= 65535
res.append(g)
return res
accel = ADXL345() # Create an instance accel of class ADXL345
x, y, z = accel.read() # accel calls itself to measure x, y, and z and store
them in a list. Then assign the values measured to x, y, and z.
Now, rotate the acceleration sensor, and you should see the values printed on the screen
change.
Copyright Notice
All contents including but not limited to texts, images, and code in this manual are owned by
the SunFounder Company. You should only use it for personal study, investigation, enjoyment,
or other non-commercial or nonprofit purposes, under the related regulations and copyrights
laws, without infringing the legal rights of the author and relevant right holders. For any
individual or organization that uses these for commercial profit w ithout permission, the
Company reserves the right to take legal action.
SunFounder