2/14/2024 0 Comments Adxl 345 spi arduino wiring![]() The SINGLE_TAP bit is set when a single acceleration event that is greater than the value in the THRESH_TAP register (Address 0x1D) occurs for less time than is specified in the DUR register (Address 0x21). The DATA_READY bit is set when new data is available and is cleared when It is no more available. Here is the information from the datasheet. This device offers a good series of interrupt modes, which are very useful in smart/bio-metric logging. To connect with SPI, you must change the constructor Serial.print("Z: ") Serial.print() Serial.print(" ") Serial.println("m/s^2 ") Serial.print("Y: ") Serial.print() Serial.print(" ") Serial.print("X: ") Serial.print() Serial.print(" ") * Display the results (acceleration is measured in m/s^2) */ * Display additional settings (outside the scope of sensor_t) */ * Display some basic information on this sensor */ * Set the range to whatever is appropriate for your project */ Serial.println("Ooops, no ADX元45 detected. * There was a problem detecting the ADX元45. Serial.println("Accelerometer Test") Serial.println("") While (!Serial) // for Leonardo/Micro/Zero Serial.print ("Resolution: ") Serial.print(sensor.resolution) Serial.println(" m/s^2") Serial.print ("Min Value: ") Serial.print(sensor.min_value) Serial.println(" m/s^2") Serial.print ("Max Value: ") Serial.print(sensor.max_value) Serial.println(" m/s^2") Serial.print ("Unique ID: ") Serial.println(nsor_id) Serial.print ("Driver Ver: ") Serial.println(sensor.version) Serial.print ("Sensor: ") Serial.println(sensor.name) * Assign a unique ID to this sensor at the same time */Īdafruit_ADX元45_Unified accel = Adafruit_ADX元45_Unified(12345)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |