Http Post in Macro?
-
@clearlynotstef said in Http Post in Macro?:
Can I have the Filament monitor call a different macro than pause.g?
not without making changes to the firmware afaik.
but you can connect the filament monitor to the esp and have the esp execute M98 filamentmonitor.g over http/telnet/serial.
-
@clearlynotstef said in Http Post in Macro?:
can I run a macro from within a second macro?
Yes. M98 p"/sys/macro.g" or p"/macros/macro.g"
Can I have the Filament monitor call a different macro than pause.g
Not if it is set up as the filament monitor.
However, if you connect the hardware filament monitor to a GPIO pin and set a trigger, that trigger can pause, and do anything else you can do from a macro.
-
Was going to make a new thread but I guess let's keep this all in here. Does anyone know if the extra gpio pins that can be M42'd are pulled down if switched off (S0) or if they're just floating? Based on my printer paused notification I just got even though I'm not printing anything, I'm assuming it's floating?
-
If it is the correct pin, which is sometimes very hard to figure out what's what, a M42 S0 should cause it to pull down. It would be capable of sinking current up to the spec of the chip, usually under 20ma.
-
@Danal that's surprising! Floating would have explained everything. I'm pretty positive it's the right pin, and I did test it 5 or 6 times in a row, S0 to s1 back and forth and watching the notifications track perfectly. I guess I'll throw a 10k resistor from gnd on the esp8266 to the input pin on the esp8266 and see if that helps? I'm no electrical engineer over here lol
-
It can sink or source 2mA, 4mA on a few select pins; (20mA is for the 8bit chips like attiny/atmega)
Some pins have pull up/downs in hardware, others configured in firmware; gotta check schematics and config to be sure.
-
@bearer said in Http Post in Macro?:
It can sink or source 2mA, 4mA on a few select pins; (20mA is for the 8bit chips like attiny/atmega)
Some pins have pull up/downs in hardware, others configured in firmware; gotta check schematics and config to be sure.
WOW, good to know!!!
-
@clearlynotstef said in Http Post in Macro?:
@Danal that's surprising! Floating would have explained everything. I'm pretty positive it's the right pin, and I did test it 5 or 6 times in a row, S0 to s1 back and forth and watching the notifications track perfectly. I guess I'll throw a 10k resistor from gnd on the esp8266 to the input pin on the esp8266 and see if that helps? I'm no electrical engineer over here lol
Approx 70K to 130K, nominal 100K is what the SAM4E series does internally for pull up or down, so I'd just copy that.
-
@bearer I'm using duet2 WiFi, pin CS5, logical pin 60, expansion header pin 50. Any idea?
-