Output module(s) Sparkfun Relay kits!

Hey again,

so the last couple of days I spent my free time trying to setup my unsupported powerbox with a custom module. With a little help from a friend I succeeded.

there’s 2 versions.

A version with sparkfuns Slow_pwm function. You can set duty cycle’s to a promised Hertz rate. However it will only switch states twice every second. once off and once on. The time the relay is in on_state is the duty_cycles percent…

This was so utterly useless to me I changed the code to an on/off version as well. Both modules are attached below.

btw: if you have on/off and PWM in 1 module I didn’t get it to show configured because with on / off its expecting on or nothing, and not a PWM Value… or 0… you might want to look into that…

without further ado:

Sparkfun solid state relay 2.py (8.1 KB)
Sparkfun solid state relay PWM 2.py (10.9 KB)

1 Like

Great. Thanks for sharing the models you made. I’ve never done it, but you should be able to have a mix of on/off and PWM channels in an output, but I’ve never tried it. You would just need to have the measurements and channels defined appropriately and set the output types to both on/off and PWM.