AirTube to AtomS3
-
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.0300.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!
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