449 views|2 replies

8

Posts

1

Resources
The OP
 

Xiaohui's mission submission extra chapter [Copy link]

 This post was last edited by louislouis on 2023-11-12 21:04

Thanks again to the organizers of this event, Digi-Key Electronics and eeworld.

This post updates the usage sharing of LIS3DH sensor:

The equipment is as follows:

The device is controlled using the I2C protocol and the adafruit_lis3dh.mpy library provided by circupython is used to complete the relevant control.
The hardware connections are as shown, using the power supply and two I2C pins on the Adafruit ESP32-S3 TFT Feather to connect to SCL and DSA respectively:

The python code is as follows:

import time
import board
import busio
import adafruit_lis3dh

lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c)
while True:
    x, y, z = [
        value / adafruit_lis3dh.STANDARD_GRAVITY for value in lis3dh.acceleration
    ]
    print("x = %0.3f G, y = %0.3f G, z = %0.3f G" % (x, y, z))
    time.sleep(0.1)

The above code can be used to control LIS3DH and display the sensor values in the xyz directions on the screen.

The value refresh frequency is set according to the time.sleep(0.1) statement. It is recommended not to refresh too quickly.

At the same time, if the motherboard temperature is too high, you can connect a small fan to the 5V power supply for heat dissipation. PS, the motherboard will not overheat when the program is actually running, so fan heat dissipation is not very meaningful

This post is from DigiKey Technology Zone

Latest reply

The temperature of the motherboard is indeed very high. The temperature collected by the onboard BME280 sensor is also very high. Otherwise, the board has a reserved temperature but no temperature is placed.   Details Published on 2023-11-13 08:39
 
 

6570

Posts

0

Resources
2
 

Refresh too fast, the motherboard temperature is too high.

This post is from DigiKey Technology Zone
 
 
 

6027

Posts

6

Resources
3
 

The temperature of the motherboard is indeed very high. The temperature collected by the onboard BME280 sensor is also very high. Otherwise, the board has a reserved temperature but no temperature is placed.

This post is from DigiKey Technology Zone
Personal signature

在爱好的道路上不断前进,在生活的迷雾中播撒光引

 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list