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

    AirTube to AtomS3

    Scheduled Pinned Locked Moved Units
    1 Posts 1 Posters 1.3k Views
    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 Offline
      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

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • First post
        Last post