The Example Code page in the STM8 eForth Wiki contained some seriously "under-hyped" projects, libraries and demos.
Some of the demos really deserve to be more "accessible" (search engines algorithms don't rank the beauty of code ;-) ). Here is one from the attic:
STM8 eForth W1209 based HC-SR04 Ultrasonic Distance Display
This code uses a W1209 and a HC-SR04 (or a compatible device for $0.75) to create an ultrasonic distance display. By controlling the relay, building an approximation detector, fill level controller, or some other embedded control device is easy.
Also see the discussion in Issue #136:
I received a HC-SR04 and connected it to a W1209 through PC3/TIM1_CH3 (the set key input). With the STM8S Timer1 puls-width measurement feature it works surprisingly well (up to about 3m).
The W1219 doesn't have an input that's equally well suited, but I'm sure that something can be hacked with PD4/TIM2_CH1 (although the background task might have to use TIM1 then).
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.