Git Product home page Git Product logo

e220lib's Introduction

Hi there, I'm Connor, a fourth year computer science masters student interested in cybersecurity, drones and all other things to do with tech

Project status remarks:

  • Active: Active development is ongoing
  • Backburn: Active development has been paused but planned work still exists
  • Retired: All planned work has been completed

e220lib's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

lejibxl

e220lib's Issues

Missing some includes during complinig

Hello Connor,
Im facing several errors during compilin sketch

In file included from C:\Users\admin\AppData\Local\Temp\.arduinoIDE-unsaved2023820-14888-vmu0vk.eabwm\Receive\Receive.ino:2:0:
c:\Users\admin\Documents\Arduino\libraries\E220Lib\src/E220.h:9:10: fatal error: USB/USBAPI.h: No such file or directory
 #include "USB/USBAPI.h"
          ^~~~~~~~~~~~~~
compilation terminated.

exit status 1

Compilation error: exit status 1

its reproducing only on 1.3 version of e220lib form offcial arduino repo

on 1.1.2 i have problems with pins m0, if i set it how it should be defined module.init returns

17:33:40.216 -> Error reading module config, check the wiring
17:33:40.249 -> Issue initiating the module

if i replace it mo --> aux, aux --> mo, init gone fine but i suppose that module works in wrong mode because wrong voltage levels on pins/
i got stuck(

small misprint in /examples/configuration/configuration.ino

line 30 > there is no semicolon at the end
line 22 > //E220 radioModule(receiver, m0, m1, aux);
needs to be understood
Stream &mySerial3 = (Stream &)receiver;
E220 radioModule(&mySerial3, m0, m1, aux);

ConnorKirkpatrick a big thank you for your work

escapeCharacter has a little sense with binary data

The escape character is inserted at the end in the function for sending binary data, which is used in the function for receiving binary data to interrupt reading.

Since binary data can spread across the value range of a byte, there is no wise choice for escapeCharacter.

It seems to me that it is better to leave escapeCharacter only in send and receive functions for strings and remove it from functions for binary data:

diff --git a/src/E220.cpp b/src/E220.cpp
index 11b3497..5d06406 100644
--- a/src/E220.cpp
+++ b/src/E220.cpp
@@ -1008,7 +1008,6 @@ bool E220::sendTransparentData(uint8_t *data, int size) {
     for(int i = 0; i < size; i++){
       _streamSerial->write(data[i]);
     }
-    _streamSerial->write(escapeCharacter);
     _streamSerial->flush();
     return true;
   }
@@ -1096,13 +1095,12 @@ bool E220::sendFixedData(unsigned int address, int channel, uint8_t *data, int s
       delay(10);
     }
   }
-  uint8_t message[size+4];
+  uint8_t message[size+3];
   message[0] = highByte(address);
   message[1] = lowByte(address);
   message[2] = (uint8_t) channel;
   memcpy(&message[3],data,size);
-  message[size+3] = escapeCharacter;
-  _streamSerial->write(message,size+4);
+  _streamSerial->write(message,size+3);
   _streamSerial->flush();
   return true;
 }
@@ -1128,7 +1126,7 @@ String E220::receiveData() {
  */
 bool E220::receiveData(uint8_t *data, int size) {
   if(_streamSerial->available()){
-   _streamSerial->readBytesUntil(escapeCharacter,data,size);
+   _streamSerial->readBytes(data,size);
    return true;
   }
   else{

Example issue Compilation error: 'mySerial' was not declared in this scope

Hello, first of all thanks for your work.
I am currently trying to get communication between two E220 working and seem to be struggeling a bit. In your examples mySerial is used in the loop however it is out of scope for me.

Also as a sidenote is there any known issues working with softwareserial as i am really struggeling to get messages to send/recieve.

Thanks for your help!

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.