Any option to use it with I2C to UART adapter like DFRobot DFR0627? #82
Replies: 1 comment 3 replies
-
Yea, you're trying to use I²C with CRSF for Arduino, which is not yet supported. Currently, I am cleaning CRSF for Arduino's codebase up, then carrying on with writing documentation, which are the last two things I need to do before I release Version 1.0.0. In the meantime, can you jump into my Issues tab and submit a feature request for I²C support? I see you're also compiling for an ESP8266, a target that is not yet supported by CRSF for Arduino. Keep in mind that the aforementioned may not make it into the upcoming release of Version 1.0.0, because I am already im the process of finalising its release. Your requests will be included in one of CRSF for Arduino's |
Beta Was this translation helpful? Give feedback.
-
Hello Cassandra,
trying to use you lib in my implementation for robot controlled by ESP8266 which have on fact only one UART used by USB and monitoring.
my current code is:
`
/* Arduino is included here for shits and giggles. */
#include <Arduino.h>
/* 1. Add Cassie Robinson's CRSFforArduino.h library. */
#include <CRSFforArduino.hpp>
#include <DFRobot_IICSerial.h>
DFRobot_IICSerial iicSerial1(Wire, /subUartChannel =/SUBUART_CHANNEL_1,/*IA1 = */1,/*IA0 = */1);//Construct UART1
//DFRobot_IICSerial iicSerial1;//Default constructor, UART1, IA1 = 1, IA0 = 1
DFRobot_IICSerial iicSerial2(Wire, /subUartChannel =/SUBUART_CHANNEL_2, /*IA1 = */1,/*IA0 = */1);//Construct UART2
/* 2. Declare a CRSFforArduino object with your board's default UART port.
You can call it literally anything you want. */
CRSFforArduino crsf = CRSFforArduino(&iicSerial1);
void setup()
{
Serial.begin(115200);
iicSerial1.begin(/*baud = */115200);/UART1 init/
//iicSerial1.begin(/*baud = */115200, /*format = */IICSerial_8N1);
iicSerial2.begin(/*baud = */115200);/UART2 init/
while (!Serial)
{
;
}
Serial.println("Channels Example");
}
void loop()
{
/* 4. Update the main loop with new RC data. */
crsf.update();
}
`
and compilation fails on the line
CRSFforArduino crsf = CRSFforArduino(&iicSerial1);
with the errors like
error: no matching function for call to 'sketchLayer::CRSFforArduino::CRSFforArduino(DFRobot_IICSerial*)'
13 | CRSFforArduino crsf = CRSFforArduino(&iicSerial1);
| ^
In file included from C:\RABOCHIJ\nini tank\Arduino kod\CSRF_ZZCAT\CSRF_ZZCAT.ino:5:
c:\RABOCHIJ\nini tank\Arduino kod\libraries\CRSFforArduino\src/CRSFforArduino.hpp:39:9: note: candidate: 'sketchLayer::CRSFforArduino::CRSFforArduino(HardwareSerial*)'
39 | CRSFforArduino(HardwareSerial serialPort);
| ^~~~~~~~~~~~~~
c:\RABOCHIJ\nini tank\Arduino kod\libraries\CRSFforArduino\src/CRSFforArduino.hpp:39:40: note: no known conversion for argument 1 from 'DFRobot_IICSerial' to 'HardwareSerial*'
39 | CRSFforArduino(HardwareSerial *serialPort);
Beta Was this translation helpful? Give feedback.
All reactions