Coder Social home page Coder Social logo

Comments (15)

ericlangel avatar ericlangel commented on June 16, 2024

hi @kevinuav
me and @BrushlessPower have no acces to the "login protocol". And it is not necessary.

normal login:
the Sensor needs a Slot Nummer to send his telemetry. So remote Control is looking for a free Slot and set the Slot Number in the Sensor.

Manual Login:
You can set your Sensors manually in your Remote Control. You just have to tell your Code which Slot Numbers are used for which Sensor.

if you have problems, please post your Remote Control type.
I can help you with T14SG and i think its similar to other models.

from sbus2-telemetry.

kevinuav avatar kevinuav commented on June 16, 2024

Hi,my remote controller is T18SZ. the receiver is R3001SB. I wanna get all my remote controller's control value and send back my telemetry data with just connecting a sbus2. Is sbus2's timing sequence equals sbus1 + the telemetry slots?
So that I can read the control value as a sbus1 protocol. Then send back the telemetry data with the slots?

from sbus2-telemetry.

BrushlessPower avatar BrushlessPower commented on June 16, 2024

@kevinuav

please look at the Examples. The "Futaba_Telemetry" Example does exactly what you want

you can get your Channel Values with:
SBUS2_get_servo_data( 2 ); -> Example for Channel 2

Were you able to set your Sensors manually in your T18SZ?

from sbus2-telemetry.

kevinuav avatar kevinuav commented on June 16, 2024

Hi,Thank you for your help.
I inspect the sbus2 signal with the logic analyser. And I noticed a odd place. The every frame which ends with 0x04 comes with 3bytes. what are they?
And BTW. Could I send my message directly after the 0x04(slot0-7),0x014(slot8-15).......... without any other operation?
截屏2022-03-23 下午3 58 39
截屏2022-03-23 下午3 58 21

from sbus2-telemetry.

ericlangel avatar ericlangel commented on June 16, 2024

0x04 is Frame No.1
After Frame No. there comes SLOT 0- 7

0x03, 0xC4 and 0x00 -> is Slot 0 = Receiver Voltage

No, you cant send your SLOTS directly after the Frames. There are some strict Timings needed.

What are you trying to do?
Do you want to port the library to another MCU?

from sbus2-telemetry.

kevinuav avatar kevinuav commented on June 16, 2024

Yeah I wanna transplant the code to STM32F7.

from sbus2-telemetry.

ericlangel avatar ericlangel commented on June 16, 2024

soneone already asked in #32 for STM32 Support

Do you want to code it Bare Metal on Registers?
Or with HAL - Arduino functions to make it usable for other STM32?

You just need 2 things:

  • USART RX Interrupt (on every byte or after 25 Bytes)
  • Timer Interrupt

After receiving the SBUS Frame (25Bytes) start the Timer with 2000ms
in Timer Interrupt, send SLOT Data and start the Timer again with 660ms (repeat 6 times)

the Rest is easy

from sbus2-telemetry.

kevinuav avatar kevinuav commented on June 16, 2024

Got it!
I wanna port it to my STM32F7. But I still have a question about sbus2. Why the receiver's voltage data comes out from the receiver since the telemetry is sending back the data from sensor to RC? The direction of the data stream should be sensor->receiver->RC. However the data stream I got from logic analyses is receiver->sensor. Dose it work like this: receiver->sensor->receiver->RC? This confuses me.
And could I send the Telemetry data after the receiver voltage?

from sbus2-telemetry.

ericlangel avatar ericlangel commented on June 16, 2024

i think you have to ask Futaba, why they have the RX Voltage available on the SBUS2.

You can Send Slot 1 320ms after Slot 0 (RX Voltage)
Your Timer have to do it.
Let the Timer work also on Slot 0.

  1. you can check the timing (toggle a pin on each timer interrupt)
  2. you will need it for Slot 8, 16 and 24.

just dont set any Sensor on Slot 0.
This Library will do the rest for you

from sbus2-telemetry.

kevinuav avatar kevinuav commented on June 16, 2024

OK. thank you for your help.

from sbus2-telemetry.

ericlangel avatar ericlangel commented on June 16, 2024

please share your code when you are finished, or come back when you have problems

and we should continue in #32

from sbus2-telemetry.

kevinuav avatar kevinuav commented on June 16, 2024

Hi,
Thanks for you help. I can send back the data for the average slot. But the jetcat's and the GPS's. Why? Aren't the GPS's and the jetcat's slots the same as the average?

from sbus2-telemetry.

ericlangel avatar ericlangel commented on June 16, 2024

@kevinuav
what is the average Slot?
i dont understand what you are saying.

p.s. could you get it working with STM32?

from sbus2-telemetry.

kevinuav avatar kevinuav commented on June 16, 2024

Not yet.
I can send back the message for the first frame. But the other frames since the function" write" cost me 4ms. So the GPS and the jetcat can never been receive correct.

from sbus2-telemetry.

ericlangel avatar ericlangel commented on June 16, 2024

why you want to receive the jetcat and gps sensor?
you should write them?

So if i understand you correctly, you are receiving the SBUS Frames with USART Interrupt?
do you receive every Frame?
Did you set up the timer to fire on every Slot? for the first stuff you dont need to Send telemetry Data. Just toggle a LED in the Timer interrupt to see an the Scope/logic analyser that the timing is correct.

from sbus2-telemetry.

Related Issues (20)

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.