mA meter tach
mA meter tach
i have scooter tachometer (was by oem) but controller chip has been broken .
Tachometr is mA meter , it can controlling with PWM help .
I want use it in multi modes . (you can see it in patch)
I wrote some code , but it doesn't work . (compiling without errors)
Andrey , can you help me?
Tachometr is mA meter , it can controlling with PWM help .
I want use it in multi modes . (you can see it in patch)
I wrote some code , but it doesn't work . (compiling without errors)
Andrey , can you help me?
- Attachments
-
- tachController.patch
- (5.64 KiB) Downloaded 775 times
- AndreyB
- Site Admin
- Posts: 14292
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: mA meter tach
Code: Select all
startSimplePwm(&displayPwm, "Display solenoid",
DISPLAY_SWITCH , //GPIOB_10,
[b]0[/b],
DISPLAY_SOLENOID_PWM_FREQUENCY,
applyPinState
);
Try 0.2 a default duty cycle
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Re: mA meter tach
i didn't know about 122nd ticket .
But i asked about another : i didn't defined "DISPLAY_SWITCH" and code doesn't know what is hw pin . where i can define it ?
Patch have all difference between "clear" code and my code .
But i asked about another : i didn't defined "DISPLAY_SWITCH" and code doesn't know what is hw pin . where i can define it ?
Patch have all difference between "clear" code and my code .
- AndreyB
- Site Admin
- Posts: 14292
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: mA meter tach
now you know about this defect which might be relevantrus084 wrote:i didn't know about 122nd ticket .
No, you did not really ask about that. As far as I know, you've asked "I wrote some code , but it doesn't work" which is a typical case of http://rusefi.com/wiki/index.php?title=40rus084 wrote: But i asked about another : i didn't defined "DISPLAY_SWITCH" and code doesn't know what is hw pin . where i can define it ?
this is actually a problem. Your patch has too much stuff which has nothing to do with your question, this makes it harder to respond.rus084 wrote: Patch have all difference between "clear" code and my code .
please google "how to ask a good question"
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
- AndreyB
- Site Admin
- Posts: 14292
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: mA meter tach
there is a bit of a mess around brain_pin enum, output_pin enum and OutputPin struct, I will now try to simplify this.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
- AndreyB
- Site Admin
- Posts: 14292
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: mA meter tach
Done. io_pin_e is not really needed any more, it would probably be eliminated pretty soon.russian wrote:there is a bit of a mess around brain_pin enum, output_pin enum and OutputPin struct, I will now try to simplify this.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Re: mA meter tach
[video][/video]
but method getRPM() return "0" everytime .
but method getRPM() return "0" everytime .
- Attachments
-
- tach2.patch
- (5.6 KiB) Downloaded 750 times
Re: mA meter tach
it's work !
but i need https://sourceforge.net/p/rusefi/tickets/122/
else i have problem with power supply from laptop ( yersterday usb power in laptop was good ): 2.4V! but i didn't connect any devices to the discovery .
i hear beeping from laptop when discovery is connected . (hsdpa modem have more power consumption , but it work's good )
Code: Select all
float rpm = getRpm() ;
return rpm/10000;
else i have problem with power supply from laptop ( yersterday usb power in laptop was good ): 2.4V! but i didn't connect any devices to the discovery .
i hear beeping from laptop when discovery is connected . (hsdpa modem have more power consumption , but it work's good )
- AndreyB
- Site Admin
- Posts: 14292
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: mA meter tach
Would be nice if you try to fix itrus084 wrote: but i need https://sourceforge.net/p/rusefi/tickets/122/
The general idea - if PWM is below 0.01% or above 99.99% instead of doing the normal scheduling it should just pause PWM for same 10ms. So, somewhere it should set next event invocation to 10ms instead of 0.001% of period which breaks everything
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
- AndreyB
- Site Admin
- Posts: 14292
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: mA meter tach
Looks like this issue was resolved at some point in the past? I do not see any issues with zero or 100% PWMrus084 wrote:but i need https://sourceforge.net/p/rusefi/tickets/122/
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
- AndreyB
- Site Admin
- Posts: 14292
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: mA meter tach
I think this should be controlled via FSIO, not custom code.
FSIO would allow you define a formula which would translate your RPM into duty cycle, that's exactly what FSIO was designed for.
FSIO would allow you define a formula which would translate your RPM into duty cycle, that's exactly what FSIO was designed for.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Re: mA meter tach
you are right . but i have problems with setup FSIO
- AndreyB
- Site Admin
- Posts: 14292
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: mA meter tach
please elaborate. have you seen http://rusefi.com/wiki/index.php?title=Manual:Flexible_Logic ?rus084 wrote:i have problems with setup FSIO
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute