Search found 57 matches

by sigi
Thu Apr 06, 2023 3:51 pm
Forum: General discussion
Topic: Rotary encoder with blue pill
Replies: 31
Views: 42989

Re: Rotary encoder with blue pill

look that code works well for me , of course it tracks the encoder movements 100% accurately... no missed ticks at all... no matter what u do in normal sketch code... maybe u miss to show a change but the changes are always tracked... just how it must be. THE PROBLEM: the internal counter goes from ...
by sigi
Thu Apr 06, 2023 1:55 am
Forum: General discussion
Topic: Rotary encoder with blue pill
Replies: 31
Views: 42989

Re: Rotary encoder with blue pill

Hi

this is my actual code about this...

test it MAYBE it can give u some info...
by sigi
Sun Mar 05, 2023 5:13 pm
Forum: General discussion
Topic: Rotary encoder with blue pill
Replies: 31
Views: 42989

Re: Rotary encoder with blue pill

playing more u can even work without attachedinterrupts... #include "HardwareTimer.h" HardwareTimer MyTimer(1); float units=0.0; float incre=0.5; float min = -4; float max = 3.5; float start =-2.0; int range =4*(max-min)/incre; void setup() { //timer 1 pins pinMode(PA8 , INPUT_PULLUP); pin...
by sigi
Sun Mar 05, 2023 2:41 am
Forum: General discussion
Topic: Rotary encoder with blue pill
Replies: 31
Views: 42989

Re: Rotary encoder with blue pill

playing with the code I solved the initial problem... it just need a Refresh()... not A simple code like this works very good... #include "HardwareTimer.h" HardwareTimer timer(4);//PB6 and PB7 float units=0.0; float incre=0.1; void func(){ if (timer.getDirection()) {units-=incre;} else {un...
by sigi
Sat Mar 04, 2023 4:14 pm
Forum: General discussion
Topic: Rotary encoder with blue pill
Replies: 31
Views: 42989

Re: Rotary encoder with blue pill

ok thanks... well I do my own rotary lib long ago... https://drive.google.com/file/d/1iWFBESSnNUVetBf4_aRP_08X7BlsiRg5/view?usp=share_link ... and this is the way u setup it... #include <RotaryEncoder.h> float maxMark = 12.0; float minMark = 0.0; float incMark = 0.25; #define Enc_CLK PB8 #define Enc...
by sigi
Fri Mar 03, 2023 1:59 pm
Forum: General discussion
Topic: Rotary encoder with blue pill
Replies: 31
Views: 42989

Re: Rotary encoder with blue pill

Thanks!!! just works for me like a charm initially using "stepsPerNotch = 4" will look for a way to setup it using: - a float increment - low and high limits thanks! PD: Maybe it will be a great addition to setup what to do with the button on Press, PRessAfter, Release, etc etc In the same...
by sigi
Thu Mar 02, 2023 5:53 pm
Forum: General discussion
Topic: Rotary encoder with blue pill
Replies: 31
Views: 42989

Re: Rotary encoder with blue pill

HI Im playing with the included example about hardware timer as encoder .. location is: "Sketchbook\Hardware\Arduino_STM32-master\STM32F1\libraries\A_STM32_Examples\examples\Sensors\HardTimerAsEncoder" I use this small code mod to show the issue: #include "HardwareTimer.h" Hardwa...
by sigi
Sat Apr 03, 2021 5:31 pm
Forum: Off topic
Topic: Throttle wireless sensor
Replies: 16
Views: 10249

Re: Throttle wireless sensor

Im waiting for the units BUT yes I know that it is supposed that they will NOT give the required res. BUT what if they give a basic position/correction start point and the rest can be done by micro-step count? I already have control over micro step or 1/2 step mode on my board so I can slew the tele...
by sigi
Mon Mar 01, 2021 2:49 pm
Forum: Off topic
Topic: Throttle wireless sensor
Replies: 16
Views: 10249

Re: Throttle wireless sensor

at this moment Im not looking for something not just for throttle, these units are very good and deserve more research. I mean they can be as good to use as a measurement angle for a telescope.
by sigi
Mon Mar 01, 2021 2:23 pm
Forum: Off topic
Topic: Throttle wireless sensor
Replies: 16
Views: 10249

Re: Throttle wireless sensor

thanks Im aware of that and yes it is very probable that they include the wrong magnet. Thats why the expensive 14bit one does not include one I suppose.

Go to advanced search