Read the statement by Michael Teeuw here.
Is it possible to ad an Arduino?
-
@Shinji0912 there are a bunch of arduino modules on github
google search
mmm-arduino github
some are general (arduport)
some are more specific MMM-temphumidity -
@Shinji0912 Hi, I wrote a module which converts messages received at serial interfaces to notifications (https://github.com/Tom-Hirschberger/MMM-Serial-Notifications). I have two Arduinos connected to my Pi with gesture and distance sensors.
My temperature module (https://github.com/Tom-Hirschberger/MMM-Temperature) can receive notifications to update the values.
Edit: The notification feature is only available in the development branch at the moment. I will mere it to the master the next days.
There are examples integrated which show how to connect an esp32 board with WiFi to get temperature and humidity.
Currently I am working on a module which should use MQTT to control an WS2801 LED Strip. But this one is in a very early state and will take a while to develop. -
@wishmaster270 Wow thank you very much , im completly new to this and first of all this helps me out very much and im going to try to make my own module showing an API from our school , is it okay if i ask you questions when i need help?
and btw. rrealllyy appreciate your help :) -
@sdetweil I tried the “Arduports” one but for some reason it didn’t worked for the sensors im using ^^
-
@Shinji0912 u have to have code running in the Arduino sending the data, doesn’t just happen
-
@sdetweil I know I’ve set it up but it didn’t worked.
-
@Shinji0912 seems pretty simple, connect serial port for arduino to serial port for PI…
arduino send 10
https://www.arduino.cc/reference/en/language/functions/communication/serial/write/
pi read 10
https://www.npmjs.com/package/serialportu can test that without MagicMirror
-
This post is deleted! -
@sdetweil Thats my Current Arduino code :
volatile int32_t m_counter = 0; bool WasStarted = false; static const char *pcDHT11Prefix = "[sensor:DHT11:"; static const char *pcPostfix = "]"; void setup() { Serial.begin(9600); while(!Serial); Serial.println("[status:setup:starting]"); Serial.println("[sensor:DHT11:11]"); int test = 1; m_counter = test; if(test > 1) { WasStarted = false; Serial.println("[status:setup:failed]"); return; } delay(3000); WasStarted = true; Serial.println("[status:setup:started]"); delay(100); } void loop() { Serial.print(m_counter + 11); Serial.println(pcPostfix); if(m_counter % 3 == 0) { delay(1000); Serial.print(pcDHT11Prefix); Serial.print(m_counter + 11); Serial.println(pcPostfix); delay(2000); } if(m_counter >= 60) m_counter = 0; m_counter++; delay(1000); }
and i got the ArduPorts running on the MM itself
now it is running but always searching for the module … see Picture.
-
@Shinji0912 and the config for the port ??
config: { portname: "/dev/ttyUSB0",
ls /dev | grep -i usb
I don’t see a ttyUSB0 on my pi4…
is that the right one on pi?i would guess that is for a USB plugin serial port, not direct serial port…
I do have a /dev/serial1 (on all 3 of my pi devices, Pi0, Pi3, and Pi4)