Giter Club home page Giter Club logo

ppm-reader's Introduction

ppm-reader's People

Contributors

jpwhite4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ppm-reader's Issues

modify for failsafe?

Hi folks,
is there a way to add failsafe mechanism for this, when there are no new signal from receiver? i think this is a crucial feature.
best regards, d.

attachInterrupt incompatibility

I have an incompatibility problem with the interrupts and the ppm reader library.
In my project I need to read a ppm signal and another sensor that uses an interrupt. I made a simplify version of my code which keeps the error. If anyone has a solution I will be very grateful.

arduino code below


#include <PPMReader.h>    

#define interruptPin_TEST 3 //interrupt pin for a test sensor
int interruptPin_PPM = 2;   //interrupt pin for the ppm library
int channelAmount = 6;      //declaration of the 6 channels 

PPMReader ppm(interruptPin_PPM, channelAmount); //declaration of reading of a PPM signal

void testvoid(){
  Serial.print("void test use");
  }
  
void setup() {
  Serial.begin(19200);
  pinMode(interruptPin_TEST, INPUT);
  attachInterrupt(digitalPinToInterrupt(interruptPin_TEST), testvoid, RISING); //declaration of an interrupt for a test sensor
}

void loop() {
  unsigned long channel_1 = ppm.latestValidChannelValue(1, 0); //read channel 1 of the PPM signal
  Serial.print(String(channel_1) + " ");                  
  Serial.println();
}

error in the console during compilation below

WInterrupts.c.o (symbol from plugin): In function `attachInterrupt':
(.text+0x0): multiple definition of `__vector_1'
C:\Users\FREDPO~1\AppData\Local\Temp\arduino_build_699786\libraries\InterruptHandler\WInterrupts.cpp.o (symbol from plugin):(.text+0x0): first defined here
WInterrupts.c.o (symbol from plugin): In function `attachInterrupt':
(.text+0x0): multiple definition of `__vector_2'
C:\Users\FREDPO~1\AppData\Local\Temp\arduino_build_699786\libraries\InterruptHandler\WInterrupts.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status

hoping to have news, thank you in advance

Received values are not stable

Hello!

Thanks for your work, your code works fine.

When applying your when, I ran into a small problem.

All the values ​​I receive from the transmitter have small value jumps.

Getting data in this way

Steering = constrain(ppm.latestValidChannelValue(1, 0), 1000, 2000); // Steering wheel
Throttle = constraint(ppm.latestValidChannelValue(2, 0), 1000, 2000); // Gas pedal
Light = constrain(ppm.latestValidChannelValue(3, 0), 1000, 2000); // Button Light

I have output values ​​+-4

For example, the default Steering in the middle position should be 1500, I get 1496-1504 at the output, the same thing happens with Throttle. About 60% I have a value of 1500, the rest is 1496 or 1504.

I thought it had to do with variable resistors, but Light is a normal switch and its readings also float around +-4.

I use an arduino pro mini and I receive a signal from a 3-channel transmitter microcontroller, I could not find a datasheet for the transmitter microcontroller, so I take the data that was sent to the radio module in the past for transmission.

I have a simple oscilloscope and I can not track the signal applied to the arduino pin, I also tried to look at the signal with a logic analyzer, but my software does not support ppm signal.

Also, I do not know how the receivers supplied for my remote control behave, perhaps they do not take into account such a spread in values ​​and control the device when the values are changed within larger limits. In my case, the same arduino acts as a receiver and my connected servos and motors react very brightly to every change in values.

Please tell me possible solutions!

Make it more platform independent

Hi

I was trying to use this library with esp32 and it can't compile due to the dependency with InterruptHandler library which requires avr.h (same problem in #3 ).

If I understood correctly, the library is needed to have the possibility to call class members as ISR... I was able to modify the library (see here my fork) to remove the dependency and implementing a different approach (explained here).

Before asking for a PR, @Nikkilae I'd like to know your opinion about this...

Thanks!

Doesn't work mate

All I get is 0s in the serial monitor. Using a Mega 2560. Tried pin 2 and 3. Uncommented the #include InterruptHandler.h. Tried reading RawValues. Nothing Works. I did notice in the attachInterrupt call of PPMReader, no ISR was stated as an argument . Is that right? I can't get this to work..

10 channels for firmware upgraded FS-iA6B or FS-iA10B

Hi, i use your library for my projects and it works super responsive.
But i could not find a way to use the library for 10 channels. is there a limitation for 6? and why?
int channelAmount = 10; does not work out of the box for me. Am I doing something wrong?

can you please make the library work for stm32?

can you please make the library work for stm32?
the exact one is the STM32F103c. upon trying to compile it has an issue with include avr/io.h. i tried to comment this out but then other issues appear.
many thanks, George

How reduce noise?

I am using flysky-i6 with arduino. But I am getting a lot of noise. Suddenly the value of channel spikes up and down. Due to this issue my RC car goes crazy.

I have attested the photo of values I serial plotted. Please help me how to solve this issue.
This is when remote is off
This is when remote is on

10 channels

Hello! i wanted to share that i have your code working with 10 channels. I wanted to share this as in your github page its stated that it has been proven with 6 channels.

your code has been great! thank you :)

i used the FS-16X with the FS-iA6B.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.