Skip to content

RobertKoval/ADXL345_ESP32_Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ADXL345 WebSocket Server for ESP32 C3 32S

This project provides a WebSocket server implementation to stream data from the ADXL345 accelerometer sensor using the ESP32 C3 32S as the microcontroller.

Features

  • Retrieves acceleration data from ADXL345 in real-time.
  • Streams data to connected WebSocket clients.
  • Works with the ESP32 C3 32S microcontroller.
  • Displays sensor details on initialization.

Getting Started

Prerequisites

  • Have Arduino IDE installed.
  • An ESP32 C3 32S board and an ADXL345 sensor module.
  • Necessary libraries:
    • ESP32Time
    • ArduinoJson
    • WebSockets
    • Adafruit_Sensor
    • Adafruit_ADXL345_U

Setup & Configuration

  1. Clone this repository:

    git clone <your-repo-url>
  2. Navigate to the project directory and open the Arduino sketch in the Arduino IDE.

  3. Ensure that the required libraries mentioned above are installed.

  4. WiFi Configuration:

    • Copy the config_example.h to a new file named config.h:
      cp config_example.h config.h
    • Edit config.h and provide your WiFi SSID and password.
  5. Choose the correct board (ESP32 C3 32S) and port from the Arduino IDE.

  6. Compile and upload the sketch to your ESP32 board.

Usage

  1. Once the sketch is uploaded and running, the ESP32 will connect to the provided WiFi network.

  2. Monitor the Serial output (using Serial Monitor in Arduino IDE) to see the IP address assigned to your ESP32.

  3. WebSocket clients can connect to the WebSocket server using the provided IP on port 81.

  4. When a client is connected, the server will start streaming ADXL345 sensor data to the client.

License

This project is open source.

Generated by ChatGPT.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published