From b88d9fb85c76b3ad784081481d177d7f81116997 Mon Sep 17 00:00:00 2001 From: Eggert Jung Date: Mon, 4 Apr 2022 16:18:26 +0200 Subject: [PATCH] send spool rpm --- main.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/main.c b/main.c index c47e3de..4dd8c28 100644 --- a/main.c +++ b/main.c @@ -73,6 +73,8 @@ static void avr_init() void send_info(void){ char msg[10]; + + /* Abzug */ sprintf(msg, "%d", abzug_speed); mqtt_pub(&mqtt_client, "/Filamentanlage/05_Abzug/state/abzug/speed", msg, strlen(msg)); @@ -82,6 +84,7 @@ void send_info(void){ sprintf(msg, "False"); mqtt_pub(&mqtt_client, "/Filamentanlage/05_Abzug/state/abzug/onoff", msg, strlen(msg)); + /* Taenzer */ if(kraftsensor_valid) ltoa(kraftsensor_value, msg, 10); else @@ -95,6 +98,18 @@ void send_info(void){ itoa(taenzer_state.force_setpoint, msg, 10); mqtt_pub(&mqtt_client, "/Filamentanlage/05_Abzug/state/taenzer/sp_kraft", msg, strlen(msg)); + + /* Spule */ + itoa((250*60)/ICR5, msg, 10); + mqtt_pub(&mqtt_client, "/Filamentanlage/05_Abzug/state/spule/speed", msg, strlen(msg)); + + if(TCCR5B & (1<