Skip to content

GeekDougle/ADXL382_SPI_raspberry_pico

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the C driver code for ADXL382 sensor. The MCU used is raspberry pi pico. Data communication is done via SPI. The python file to read sensor data through serial USB and display data on GUI can be found in this repo https://github.com/dauhoangganh/ADXL382_Pico_Streamlit_Example In the main.c, ADXL382 is set up to operate in High performance mode, 8kHz bandwidth and sampling rate (output data rate) at 16KHz.

Connect Pico to ADXL382

GPIO 16 (pin 21) MISO/spi0_rx-> SDO/SDO on adxl382 board
GPIO 17 (pin 22) Chip select -> CSB/!CS on adxl382 board
GPIO 18 (pin 24) SCK/spi0_sclk -> SCL/SCK on adxl382 board
GPIO 19 (pin 25) MOSI/spi0_tx -> SDA/SDI on adxl382 board
3.3v (pin 36) -> VS & VDDIO pin on adxl382 board
GND (pin 38) -> GND on adxl382 board
connection

Deploy the binary file main.uf2 to Pico

  1. Open VScode
  2. Install raspberry pi pico extension
  3. Clone this repo to your pc
  4. In VScode raspberry pico windows, import this github project
  5. Plug the micro-usb cable to Pico while pressing the BOOTSEL button, this sets the pico in bootsel mode
  6. Click run button at the bottom right corner of vs code to flash the main.uf2 file to pico
  7. Unplug and plug the cable to pico again
  8. Open Tera Term and set up COM port
  9. See the data printed on teraterm

About

ADXL382 to PC interface via SPI on a pi Pico. Continuous data streaming.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 82.0%
  • CMake 18.0%