Giter Site home page Giter Site logo

customsoftwareserial's Issues

missing .Listen

Missing .Listen function. SoftwareSerial use this to handle 2 ports. With customSoftwareSerial i cant use with 2 ports. can you help? what is to do?

modbus and customSoftwareSerial

Hi
wanted to use this with Modbus

but got an error

Did I miss anything:

C:\Users\xxx\Documents\Arduino\libraries\ModbusMaster\src/ModbusMaster.h:74:10: note: candidate: void ModbusMaster::begin(uint8_t, Stream&) void begin(uint8_t, Stream &serial); ^~~~~ C:\Users\xxx\Documents\Arduino\libraries\ModbusMaster\src/ModbusMaster.h:74:10: note: no known conversion for argument 2 from 'CustomSoftwareSerial*' to 'Stream&' exit status 1 no matching function for call to 'ModbusMaster::begin(int, CustomSoftwareSerial*&)'

defined:
SoftSer1->begin(9600, SERIAL_8N2); //custom software serial node.begin(1, SoftSer1);
Error:
`Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

...error: no matching function for call to 'ModbusMaster::begin(int, CustomSoftwareSerial*&)'

node.begin(1, SoftSer1);

C:\Users\xxx\Documents\Arduino\libraries\ModbusMaster\src/ModbusMaster.h:74:10: note: candidate: void ModbusMaster::begin(uint8_t, Stream&)

 void begin(uint8_t, Stream &serial);

      ^~~~~

C:\Users\xxx\Documents\Arduino\libraries\ModbusMaster\src/ModbusMaster.h:74:10: note: no known conversion for argument 2 from 'CustomSoftwareSerial*' to 'Stream&'

exit status 1

no matching function for call to 'ModbusMaster::begin(int, CustomSoftwareSerial*&)'

`

Garbage @ 115200

First of all, I wanted to thank you for the library, very helpful. It is unbelievable that Arduino has so many constraints in terms of communication.

Right now, I'm using your library, but I'm having troubles with the baudrate. I can only have good data a 9600 bps. Changing to 115200 everything is just garbage. Unfortunately, my application does not allow something less that 115200 bps. In order to test the library, I did the following program. The following code uses the default pins (0,1) to transmit the word "Hello world". But I only get reliable data at 9600. Any answer will be much appreciated it.

#include <CustomSoftwareSerial.h>
CustomSoftwareSerial* customSerial;               // Declare serial
CustomSoftwareSerial* customSerial1;


//#include <SoftwareSerial.h>
#include <stdint.h>

//SoftwareSerial portOne(10, 11); // RX, TX

unsigned int read_val=0;
void setup() 
{
  //Serial.begin(115200);
  while (!Serial) 
  {
    ; // wait for serial port to connect. Needed for native USB port only
  }
  delay(10);

  customSerial = new CustomSoftwareSerial(10, 11); // rx, tx
  customSerial1 = new CustomSoftwareSerial(0, 1); // rx, tx
  customSerial1->begin(14400, CSERIAL_8N1);
  customSerial->begin(115200, CSERIAL_8N1);         // Baud rate: 9600, configuration: CSERIAL_8N1

  //portOne.begin(115200);
  delay(1000);
  //portOne.print(50,HEX);
  customSerial->print(50,HEX);
  customSerial1->print("Hello world");
}

void loop()
{
  while(true)
  {

    if (customSerial->available()) 
    {  
        read_val=customSerial->read();
        Serial.println(read_val);
        //Serial.println("Hello");  
     }  
   }  
 }

problem with myserial->readBytes

Greetings, the problem I have is that in the connection to 9600 bit 7 even parity, it does not capture the data correctly, if you could help me with that, I would be grateful.

Unknown code...

Hi
this variable is never used: uint8_t maxValueOfData
look at: CustomSoftwareSerial.cpp, Row:477:11
uint8_t maxValueOfData = round(pow(2, this->_numberOfDataBit - 1));
Thanks & Regards

To delay even parity bit without

507 writeParityBits(numberOfBits1);
508 tunedDelay(_tx_delay);
↓↓↓↓↓↓↓↓↓↓
507 writeParityBits(numberOfBits1);
508 if(this->_parityBit != NONE) {
509 tunedDelay(_tx_delay);
510 }

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.