🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    AirTube to AtomS3

    Units
    1
    1
    810
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      Gory9387
      last edited by

      Hello,
      Im trying to connect this unit:
      https://docs.m5stack.com/en/unit/tube_pressure
      to AtomS3, but dont know which pin to set as the sensor pin(I have tried pin 1 and 2)

      I have also m5stickC, and there everything fine. this is the code example that works for me there:

      #include <Arduino.h>

      int sensorPin = 33; // Sensor Pin

      void setup() {

      Serial.begin(115200);
      pinMode(sensorPin, INPUT); //Sets the specified pin to input mode. 设置指定引脚为输入模式
      }

      void loop() {
      float raw = analogRead(sensorPin); // read the value from the sensor. 读取当前传感器的值
      float Vout = raw/40953.6;
      float P = (Vout-0.1)/3.0
      300.0-100.0;
      Serial.printf("pressure: %f.2 Kpa\r\n", P);
      delay(500);
      }

      so if someone can tell me how to connect this pressure sensor to AtomS3, I'll be grateful.
      Thanks!

      1 Reply Last reply Reply Quote 0
      • First post
        Last post