├── EasyTransfer
├── I2C_Wiring.png
├── README.txt
├── UARTS_Wiring.png
├── examples
│ ├── EasyTransfer_2Way_wPot_Example
│ │ └── EasyTransfer_2Way_wPot_Example.ino
│ ├── EasyTransfer_2Way_wServo_Example
│ │ └── EasyTransfer_2Way_wServo_Example.ino
│ ├── EasyTransfer_RX_Example
│ │ └── EasyTransfer_RX_Example.ino
│ └── EasyTransfer_TX_Example
│ │ └── EasyTransfer_TX_Example.ino
├── keywords.txt
├── library.properties
└── src
│ ├── EasyTransfer.cpp
│ └── EasyTransfer.h
├── EasyTransferI2C
├── examples
│ ├── EasyTransfer_RX_Example
│ │ └── EasyTransfer_RX_Example.ino
│ └── EasyTransfer_TX_Example
│ │ └── EasyTransfer_TX_Example.ino
├── keywords.txt
├── library.properties
└── src
│ ├── EasyTransferI2C.cpp
│ └── EasyTransferI2C.h
├── EasyTransferVirtualWire
├── EasyTransferVirtualWire.cpp
├── EasyTransferVirtualWire.h
├── examples
│ ├── ETVirtualWireDemoRX
│ │ └── ETVirtualWireDemoRX.pde
│ └── ETVirtualWireDemoTX
│ │ └── ETVirtualWireDemoTX.pde
└── keywords.txt
├── I2C_Wiring.png
├── README.txt
├── SoftEasyTransfer
├── SoftEasyTransfer.cpp
├── SoftEasyTransfer.h
├── examples
│ ├── SoftEasyTransfer_RX_Example
│ │ └── SoftEasyTransfer_RX_Example.pde
│ └── SoftEasyTransfer_TX_Example
│ │ └── SoftEasyTransfer_TX_Example.pde
└── keywords.txt
└── UARTS_Wiring.png
/EasyTransfer/I2C_Wiring.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaulStoffregen/Arduino-EasyTransfer/d329cd6a665a8cec38c4b28cd9a72d455e7f69bd/EasyTransfer/I2C_Wiring.png
--------------------------------------------------------------------------------
/EasyTransfer/README.txt:
--------------------------------------------------------------------------------
1 | /******************************************************************
2 | * EasyTransfer Arduino Library v1.7
3 | * details and example sketch:
4 | * http://www.billporter.info/easytransfer-arduino-library/
5 | *
6 | * Brought to you by:
7 | * Bill Porter
8 | * www.billporter.info
9 | *
10 | * Lib version history
11 | * 1.0 Created
12 | * 1.1 Fixed dumb Copy-paste error in header file
13 | * Added a keyword file
14 | * 1.5 Forked lib into Software and Hardware Serial branches, I don't know a better way
15 | * added passing in of Serial port of different types
16 | * 1.6 Fixed bug where it wasn't clearing out the buffers if the CheckSum failed,
17 | * I'm good at dumb mistakes
18 | * 1.7 Fixed a bug where the receive function could block for too long and never process data correctly
19 | * Organized the examples to be Arduino IDE compatible
20 | * 1.8
21 | * Now Arduino 1.0 compatible!
22 | *
23 | *
24 | * Limits of the Library
25 | * You can change the Serial port,
26 | * but the Struct size must not pass 255 bytes
27 | *
28 | * The protcol is as follows:
29 | * Header(0x06,0x85),SizeofPayload,Payload,Checksum
30 | *
31 | *
32 | *This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or(at your option) any later version.
33 | This program is distributed in the hope that it will be useful,
34 | but WITHOUT ANY WARRANTY; without even the implied warranty of
35 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36 | GNU General Public License for more details.
37 |
38 | *
39 | *This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
40 | *To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or
41 | *send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
42 | ******************************************************************/
43 |
44 |
45 | ********************To Install*************************************
46 |
47 | To install, unzip and place 'EasyTransfer' folder into your 'C:\Users\{user name}\Documents\Arduino\libraries' folder or '{Arduino IDE path}\hardware\libraries" or {Arduino IDE path}\libraries" directory.
48 |
49 | Restart the Arduino IDE, look for the Library under "Sketch" -> "Import Library". You can also try the examples by finding them
50 | under "File" -> "Examples" -> "EasyTransfer".
51 |
52 | All uses of the library are in the example sketchs.
53 |
54 |
55 | *******************************************************************
56 |
57 |
58 | Library now has two versions, one for regular hardware Serial, one for use with the NewSoftSerial library
59 | making any Arduino pin capable of transfering data back and forth easily.
60 |
61 | See the examples to find out how to use the library.
--------------------------------------------------------------------------------
/EasyTransfer/UARTS_Wiring.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaulStoffregen/Arduino-EasyTransfer/d329cd6a665a8cec38c4b28cd9a72d455e7f69bd/EasyTransfer/UARTS_Wiring.png
--------------------------------------------------------------------------------
/EasyTransfer/examples/EasyTransfer_2Way_wPot_Example/EasyTransfer_2Way_wPot_Example.ino:
--------------------------------------------------------------------------------
1 | /*This is an example of the EasyTransfer Library 2way communications.
2 |
3 | The sketch is for the Arduino with a potentiometer attached to analog pin 0.
4 |
5 | This other Arduino has the servo attached to pin 9.
6 | Both have a putton attached to pin 12 and output a status using the LED on pin 13.
7 |
8 | The idea is each arduino will read the status of the button attached to it, and send it
9 | to the other Arduino, which will toggle it's LED based on the others button. The button
10 | should connect pin 12 to ground when pushed.
11 |
12 | And the Arduino with the potentiometer will send it's value to the one with the servo.
13 | The servo will move to the position based on the potentiometer.
14 | */
15 |
16 |
17 |
18 | #include
19 |
20 | //create two objects
21 | EasyTransfer ETin, ETout;
22 |
23 |
24 | struct RECEIVE_DATA_STRUCTURE{
25 | //put your variable definitions here for the data you want to receive
26 | //THIS MUST BE EXACTLY THE SAME ON THE OTHER ARDUINO
27 | int16_t buttonstate;
28 | };
29 |
30 | struct SEND_DATA_STRUCTURE{
31 | //put your variable definitions here for the data you want to receive
32 | //THIS MUST BE EXACTLY THE SAME ON THE OTHER ARDUINO
33 | int16_t buttonstate;
34 | int16_t servoval;
35 | };
36 |
37 | //give a name to the group of data
38 | RECEIVE_DATA_STRUCTURE rxdata;
39 | SEND_DATA_STRUCTURE txdata;
40 |
41 |
42 | void setup(){
43 | Serial.begin(9600);
44 | //start the library, pass in the data details and the name of the serial port. Can be Serial, Serial1, Serial2, etc.
45 | ETin.begin(details(rxdata), &Serial);
46 | ETout.begin(details(txdata), &Serial);
47 |
48 | pinMode(13, OUTPUT);
49 | //enable pull-up
50 | pinMode(12, INPUT_PULLUP);
51 |
52 | }
53 |
54 | void loop(){
55 |
56 | //first, lets read our potentiometer and button and store it in our data structure
57 | txdata.servoval = analogRead(0);
58 |
59 | if(!digitalRead(12))
60 | txdata.buttonstate = HIGH;
61 | else
62 | txdata.buttonstate = LOW;
63 |
64 | //then we will go ahead and send that data out
65 | ETout.sendData();
66 |
67 | //there's a loop here so that we run the recieve function more often then the
68 | //transmit function. This is important due to the slight differences in
69 | //the clock speed of different Arduinos. If we didn't do this, messages
70 | //would build up in the buffer and appear to cause a delay.
71 | for(int i=0; i<5; i++){
72 | //remember, you could use an if() here to check for new data, this time it's not needed.
73 | ETin.receiveData();
74 |
75 | //set our LED on or off based on what we received from the other Arduino
76 | digitalWrite(13, rxdata.buttonstate);
77 |
78 | //delay
79 | delay(10);
80 | }
81 |
82 | //delay for good measure
83 | delay(10);
84 | }
85 |
--------------------------------------------------------------------------------
/EasyTransfer/examples/EasyTransfer_2Way_wServo_Example/EasyTransfer_2Way_wServo_Example.ino:
--------------------------------------------------------------------------------
1 | /*This is an example of the EasyTransfer Library 2way communications.
2 |
3 | This sketch is for the Arduino with the servo attached to pin 9.
4 |
5 | The other Arduino has a potentiometer attached to analog pin 0.
6 | Both have a putton attached to pin 12 and output a status using the LED on pin 13.
7 |
8 | The idea is each arduino will read the status of the button attached to it, and send it
9 | to the other Arduino, which will toggle it's LED based on the others button. The button
10 | should connect pin 12 to ground when pushed.
11 |
12 | And the Arduino with the potentiometer will send it's value to the one with the servo.
13 | The servo will move to the position based on the potentiometer.
14 | */
15 |
16 | #include
17 | #include
18 |
19 | //create two objects
20 | EasyTransfer ETin, ETout;
21 | //create servo
22 | Servo myservo;
23 |
24 | struct RECEIVE_DATA_STRUCTURE{
25 | //put your variable definitions here for the data you want to receive
26 | //THIS MUST BE EXACTLY THE SAME ON THE OTHER ARDUINO
27 | int16_t buttonstate;
28 | int16_t servoval;
29 | };
30 |
31 | struct SEND_DATA_STRUCTURE{
32 | //put your variable definitions here for the data you want to receive
33 | //THIS MUST BE EXACTLY THE SAME ON THE OTHER ARDUINO
34 | int16_t buttonstate;
35 | };
36 |
37 |
38 | //give a name to the group of data
39 | RECEIVE_DATA_STRUCTURE rxdata;
40 | SEND_DATA_STRUCTURE txdata;
41 |
42 |
43 | void setup(){
44 | Serial.begin(9600);
45 | //start the library, pass in the data details and the name of the serial port. Can be Serial, Serial1, Serial2, etc.
46 | ETin.begin(details(rxdata), &Serial);
47 | ETout.begin(details(txdata), &Serial);
48 |
49 | pinMode(13, OUTPUT);
50 | //enable pull-up
51 | pinMode(12, INPUT_PULLUP);
52 |
53 | myservo.attach(9);
54 | }
55 |
56 | void loop(){
57 |
58 | //first, lets read our button and store it in our data structure
59 | if(!digitalRead(12))
60 | txdata.buttonstate = HIGH;
61 | else
62 | txdata.buttonstate = LOW;
63 |
64 | //then we will go ahead and send that data out
65 | ETout.sendData();
66 |
67 | //there's a loop here so that we run the recieve function more often then the
68 | //transmit function. This is important due to the slight differences in
69 | //the clock speed of different Arduinos. If we didn't do this, messages
70 | //would build up in the buffer and appear to cause a delay.
71 |
72 | for(int i=0; i<5; i++){
73 | //remember, you could use an if() here to check for new data, this time it's not needed.
74 | ETin.receiveData();
75 |
76 | //set our LED on or off based on what we received from the other Arduino
77 | digitalWrite(13, rxdata.buttonstate);
78 |
79 | //set our servo position based on what we received from the other Arduino
80 | //we will also map the ADC value to a servo value
81 | myservo.write(map(rxdata.servoval, 0, 1023, 0, 179));
82 |
83 | //delay
84 | delay(10);
85 | }
86 |
87 | //delay for good measure
88 | delay(10);
89 | }
90 |
--------------------------------------------------------------------------------
/EasyTransfer/examples/EasyTransfer_RX_Example/EasyTransfer_RX_Example.ino:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | //create object
4 | EasyTransfer ET;
5 |
6 | struct RECEIVE_DATA_STRUCTURE{
7 | //put your variable definitions here for the data you want to receive
8 | //THIS MUST BE EXACTLY THE SAME ON THE OTHER ARDUINO
9 | int16_t blinks;
10 | int16_t pause;
11 | };
12 |
13 | //give a name to the group of data
14 | RECEIVE_DATA_STRUCTURE mydata;
15 |
16 | void setup(){
17 | Serial.begin(9600);
18 | //start the library, pass in the data details and the name of the serial port. Can be Serial, Serial1, Serial2, etc.
19 | ET.begin(details(mydata), &Serial);
20 |
21 | pinMode(13, OUTPUT);
22 |
23 | }
24 |
25 | void loop(){
26 | //check and see if a data packet has come in.
27 | if(ET.receiveData()){
28 | //this is how you access the variables. [name of the group].[variable name]
29 | //since we have data, we will blink it out.
30 | for(int i = mydata.blinks; i>0; i--){
31 | digitalWrite(13, HIGH);
32 | delay(mydata.pause * 100);
33 | digitalWrite(13, LOW);
34 | delay(mydata.pause * 100);
35 | }
36 | }
37 |
38 | //you should make this delay shorter then your transmit delay or else messages could be lost
39 | delay(250);
40 | }
41 |
--------------------------------------------------------------------------------
/EasyTransfer/examples/EasyTransfer_TX_Example/EasyTransfer_TX_Example.ino:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | //create object
4 | EasyTransfer ET;
5 |
6 | struct SEND_DATA_STRUCTURE{
7 | //put your variable definitions here for the data you want to send
8 | //THIS MUST BE EXACTLY THE SAME ON THE OTHER ARDUINO
9 | int16_t blinks;
10 | int16_t pause;
11 | };
12 |
13 | //give a name to the group of data
14 | SEND_DATA_STRUCTURE mydata;
15 |
16 | void setup(){
17 | Serial.begin(9600);
18 | //start the library, pass in the data details and the name of the serial port. Can be Serial, Serial1, Serial2, etc.
19 | ET.begin(details(mydata), &Serial);
20 |
21 | pinMode(13, OUTPUT);
22 |
23 | randomSeed(analogRead(0));
24 |
25 | }
26 |
27 | void loop(){
28 | //this is how you access the variables. [name of the group].[variable name]
29 | mydata.blinks = random(5);
30 | mydata.pause = random(5);
31 | //send the data
32 | ET.sendData();
33 |
34 | //Just for fun, we will blink it out too
35 | for(int i = mydata.blinks; i>0; i--){
36 | digitalWrite(13, HIGH);
37 | delay(mydata.pause * 100);
38 | digitalWrite(13, LOW);
39 | delay(mydata.pause * 100);
40 | }
41 |
42 | delay(5000);
43 | }
44 |
--------------------------------------------------------------------------------
/EasyTransfer/keywords.txt:
--------------------------------------------------------------------------------
1 | #######################################
2 | # Syntax Coloring Map EasyTransfer
3 | #######################################
4 |
5 | #######################################
6 | # Datatypes (KEYWORD1)
7 | #######################################
8 |
9 | EasyTransfer KEYWORD1
10 |
11 | #######################################
12 | # Methods and Functions (KEYWORD2)
13 | #######################################
14 | sendData KEYWORD2
15 | receiveData KEYWORD2
16 | begin KEYWORD2
17 |
18 |
19 | #######################################
20 | # Constants (LITERAL1)
21 | #######################################
22 | details LITERAL1
23 |
--------------------------------------------------------------------------------
/EasyTransfer/library.properties:
--------------------------------------------------------------------------------
1 | name=EasyTransfer
2 | version=2.1
3 | author=Bill Porter
4 | maintainer=Bill Porter
5 | sentence=Transfer data between Arduinos over serial connection.
6 | paragraph=The purpose of this library is to make it easy for the everyday Arduino user working on projects with multiple Arduinos communicating with each other and sharing data over Serial connections.
7 | category=Communication
8 | url=https://github.com/madsci1016/Arduino-EasyTransfer/tree/master/EasyTransfer
9 | architectures=*
10 |
--------------------------------------------------------------------------------
/EasyTransfer/src/EasyTransfer.cpp:
--------------------------------------------------------------------------------
1 | #include "EasyTransfer.h"
2 |
3 |
4 |
5 |
6 | //Captures address and size of struct
7 | void EasyTransfer::begin(uint8_t * ptr, uint8_t length, Stream *theStream){
8 | address = ptr;
9 | size = length;
10 | _stream = theStream;
11 |
12 | //dynamic creation of rx parsing buffer in RAM
13 | rx_buffer = (uint8_t*) malloc(size+1);
14 | }
15 |
16 | //Sends out struct in binary, with header, length info and checksum
17 | void EasyTransfer::sendData(){
18 | uint8_t CS = size;
19 | _stream->write(0x06);
20 | _stream->write(0x85);
21 | _stream->write(size);
22 | for(int i = 0; iwrite(*(address+i));
25 | }
26 | _stream->write(CS);
27 |
28 | }
29 |
30 | boolean EasyTransfer::receiveData(){
31 |
32 | //start off by looking for the header bytes. If they were already found in a previous call, skip it.
33 | if(rx_len == 0){
34 | //this size check may be redundant due to the size check below, but for now I'll leave it the way it is.
35 | if(_stream->available() >= 3){
36 | //this will block until a 0x06 is found or buffer size becomes less then 3.
37 | while(_stream->read() != 0x06) {
38 | //This will trash any preamble junk in the serial buffer
39 | //but we need to make sure there is enough in the buffer to process while we trash the rest
40 | //if the buffer becomes too empty, we will escape and try again on the next call
41 | if(_stream->available() < 3)
42 | return false;
43 | }
44 | if (_stream->read() == 0x85){
45 | rx_len = _stream->read();
46 | //make sure the binary structs on both Arduinos are the same size.
47 | if(rx_len != size){
48 | rx_len = 0;
49 | return false;
50 | }
51 | }
52 | }
53 | }
54 |
55 | //we get here if we already found the header bytes, the struct size matched what we know, and now we are byte aligned.
56 | if(rx_len != 0){
57 | while(_stream->available() && rx_array_inx <= rx_len){
58 | rx_buffer[rx_array_inx++] = _stream->read();
59 | }
60 |
61 | if(rx_len == (rx_array_inx-1)){
62 | //seem to have got whole message
63 | //last uint8_t is CS
64 | calc_CS = rx_len;
65 | for (int i = 0; i
19 | *
20 | *This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
21 | *To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or
22 | *send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
23 | ******************************************************************/
24 | #ifndef EasyTransfer_h
25 | #define EasyTransfer_h
26 |
27 |
28 | //make it a little prettier on the front end.
29 | #define details(name) (byte*)&name,sizeof(name)
30 |
31 | //Not neccessary, but just in case.
32 | #if ARDUINO > 22
33 | #include "Arduino.h"
34 | #else
35 | #include "WProgram.h"
36 | #endif
37 | #include "Stream.h"
38 | //#include
39 | //#include
40 | //#include
41 | //#include
42 | //#include
43 |
44 | class EasyTransfer {
45 | public:
46 | void begin(uint8_t *, uint8_t, Stream *theStream);
47 | //void begin(uint8_t *, uint8_t, NewSoftSerial *theSerial);
48 | void sendData();
49 | boolean receiveData();
50 | private:
51 | Stream *_stream;
52 | //NewSoftSerial *_serial;
53 | uint8_t * address; //address of struct
54 | uint8_t size; //size of struct
55 | uint8_t * rx_buffer; //address for temporary storage and parsing buffer
56 | uint8_t rx_array_inx; //index for RX parsing buffer
57 | uint8_t rx_len; //RX packet length according to the packet
58 | uint8_t calc_CS; //calculated Chacksum
59 | };
60 |
61 |
62 |
63 | #endif
64 |
--------------------------------------------------------------------------------
/EasyTransferI2C/examples/EasyTransfer_RX_Example/EasyTransfer_RX_Example.ino:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | //create object
5 | EasyTransferI2C ET;
6 |
7 | struct RECEIVE_DATA_STRUCTURE{
8 | //put your variable definitions here for the data you want to receive
9 | //THIS MUST BE EXACTLY THE SAME ON THE OTHER ARDUINO
10 | int16_t blinks;
11 | int16_t pause;
12 | };
13 |
14 | //give a name to the group of data
15 | RECEIVE_DATA_STRUCTURE mydata;
16 |
17 | //define slave i2c address
18 | #define I2C_SLAVE_ADDRESS 9
19 |
20 | void setup(){
21 | Wire.begin(I2C_SLAVE_ADDRESS);
22 | //start the library, pass in the data details and the name of the serial port. Can be Serial, Serial1, Serial2, etc.
23 | ET.begin(details(mydata), &Wire);
24 | //define handler function on receiving data
25 | Wire.onReceive(receive);
26 |
27 | pinMode(13, OUTPUT);
28 |
29 | }
30 |
31 | void loop() {
32 | //check and see if a data packet has come in.
33 | if(ET.receiveData()){
34 | //this is how you access the variables. [name of the group].[variable name]
35 | //since we have data, we will blink it out.
36 | for(int i = mydata.blinks; i>0; i--){
37 | digitalWrite(13, HIGH);
38 | delay(mydata.pause * 100);
39 | digitalWrite(13, LOW);
40 | delay(mydata.pause * 100);
41 | }
42 | }
43 | }
44 |
45 | void receive(int numBytes) {}
46 |
--------------------------------------------------------------------------------
/EasyTransferI2C/examples/EasyTransfer_TX_Example/EasyTransfer_TX_Example.ino:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | //create object
5 | EasyTransferI2C ET;
6 |
7 | struct SEND_DATA_STRUCTURE{
8 | //put your variable definitions here for the data you want to send
9 | //THIS MUST BE EXACTLY THE SAME ON THE OTHER ARDUINO
10 | int16_t blinks;
11 | int16_t pause;
12 | };
13 |
14 | //give a name to the group of data
15 | SEND_DATA_STRUCTURE mydata;
16 |
17 | //define slave i2c address
18 | #define I2C_SLAVE_ADDRESS 9
19 |
20 | void setup(){
21 | Wire.begin();
22 | //start the library, pass in the data details and the name of the serial port. Can be Serial, Serial1, Serial2, etc.
23 | ET.begin(details(mydata), &Wire);
24 |
25 | pinMode(13, OUTPUT);
26 |
27 | randomSeed(analogRead(0));
28 |
29 | }
30 |
31 | void loop(){
32 | //this is how you access the variables. [name of the group].[variable name]
33 | mydata.blinks = random(5);
34 | mydata.pause = random(5);
35 | //send the data
36 | ET.sendData(I2C_SLAVE_ADDRESS);
37 |
38 | //Just for fun, we will blink it out too
39 | for(int i = mydata.blinks; i>0; i--){
40 | digitalWrite(13, HIGH);
41 | delay(mydata.pause * 100);
42 | digitalWrite(13, LOW);
43 | delay(mydata.pause * 100);
44 | }
45 |
46 | delay(5000);
47 | }
48 |
--------------------------------------------------------------------------------
/EasyTransferI2C/keywords.txt:
--------------------------------------------------------------------------------
1 | #######################################
2 | # Syntax Coloring Map EasyTransfer
3 | #######################################
4 |
5 | #######################################
6 | # Datatypes (KEYWORD1)
7 | #######################################
8 |
9 | EasyTransferI2C KEYWORD1
10 |
11 | #######################################
12 | # Methods and Functions (KEYWORD2)
13 | #######################################
14 | sendData KEYWORD2
15 | receiveData KEYWORD2
16 | begin KEYWORD2
17 |
18 |
19 | #######################################
20 | # Constants (LITERAL1)
21 | #######################################
22 | details LITERAL1
23 |
--------------------------------------------------------------------------------
/EasyTransferI2C/library.properties:
--------------------------------------------------------------------------------
1 | name=EasyTransferI2c
2 | version=2.1
3 | author=Bill Porter
4 | maintainer=Bill Porter
5 | sentence=Transfer data between Arduinos over I2C connection.
6 | paragraph=The purpose of this library is to make it easy for the everyday Arduino user working on projects with multiple Arduinos communicating with each other and sharing data over I2C connections.
7 | category=Communication
8 | url=https://github.com/madsci1016/Arduino-EasyTransfer/tree/master/EasyTransferI2C
9 | architectures=*
10 |
11 |
--------------------------------------------------------------------------------
/EasyTransferI2C/src/EasyTransferI2C.cpp:
--------------------------------------------------------------------------------
1 | #include "EasyTransferI2C.h"
2 |
3 |
4 |
5 |
6 | //Captures address and size of struct
7 | void EasyTransferI2C::begin(uint8_t * ptr, uint8_t length, TwoWire *theSerial){
8 | address = ptr;
9 | size = length;
10 | _serial = theSerial;
11 |
12 | //dynamic creation of rx parsing buffer in RAM
13 | rx_buffer = (uint8_t*) malloc(size);
14 | }
15 |
16 | //Sends out struct in binary, with header, length info and checksum
17 | void EasyTransferI2C::sendData(uint8_t i2c_address){
18 | uint8_t CS = size;
19 | _serial->beginTransmission(i2c_address);
20 | #if ARDUINO >= 100
21 | _serial->write(0x06);
22 | _serial->write(0x85);
23 | _serial->write(size);
24 | #else
25 | _serial->send(0x06);
26 | _serial->send(0x85);
27 | _serial->send(size);
28 | #endif
29 | for(int i = 0; i= 100
32 | _serial->write(*(address+i));
33 | #else
34 | _serial->send(*(address+i));
35 | #endif
36 | }
37 | #if ARDUINO >= 100
38 | _serial->write(CS);
39 | #else
40 | _serial->send(CS);
41 | #endif
42 | _serial->endTransmission();
43 | }
44 |
45 | boolean EasyTransferI2C::receiveData(){
46 |
47 | //start off by looking for the header bytes. If they were already found in a previous call, skip it.
48 | if(rx_len == 0){
49 | //this size check may be redundant due to the size check below, but for now I'll leave it the way it is.
50 | if(_serial->available() >= 3){
51 | //this will block until a 0x06 is found or buffer size becomes less then 3.
52 | #if ARDUINO >= 100
53 | while(_serial->read() != 0x06) {
54 | #else
55 | while(_serial->receive() != 0x06) {
56 | #endif
57 | //This will trash any preamble junk in the serial buffer
58 | //but we need to make sure there is enough in the buffer to process while we trash the rest
59 | //if the buffer becomes too empty, we will escape and try again on the next call
60 | if(_serial->available() < 3)
61 | return false;
62 | }
63 | #if ARDUINO >= 100
64 | if (_serial->read() == 0x85){
65 | rx_len = _serial->read();
66 | #else
67 | if (_serial->receive() == 0x85){
68 | rx_len = _serial->receive();
69 | #endif
70 | //make sure the binary structs on both Arduinos are the same size.
71 | if(rx_len != size){
72 | rx_len = 0;
73 | return false;
74 | }
75 | }
76 | }
77 | }
78 |
79 | //we get here if we already found the header bytes, the struct size matched what we know, and now we are byte aligned.
80 | if(rx_len != 0){
81 | while(_serial->available() && rx_array_inx <= rx_len){
82 | #if ARDUINO >= 100
83 | rx_buffer[rx_array_inx++] = _serial->read();
84 | #else
85 | rx_buffer[rx_array_inx++] = _serial->receive();
86 | #endif
87 | }
88 |
89 | if(rx_len == (rx_array_inx-1)){
90 | //seem to have got whole message
91 | //last uint8_t is CS
92 | calc_CS = rx_len;
93 | for (int i = 0; i
21 | *
22 | *This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
23 | *To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or
24 | *send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
25 | ******************************************************************/
26 | #ifndef EasyTransferI2C_h
27 | #define EasyTransferI2C_h
28 |
29 |
30 | //make it a little prettier on the front end.
31 | #define details(name) (byte*)&name,sizeof(name)
32 |
33 | //Not neccessary, but just in case.
34 | #if ARDUINO > 22
35 | #include "Arduino.h"
36 | #else
37 | #include "WProgram.h"
38 | #endif
39 | #include "HardwareSerial.h"
40 | //#include
41 | #include
42 | #include
43 | #include
44 | #include
45 | #include
46 |
47 | class EasyTransferI2C {
48 | public:
49 | void begin(uint8_t *, uint8_t, TwoWire *theSerial);
50 | void sendData(uint8_t address);
51 | boolean receiveData();
52 | private:
53 | TwoWire *_serial;
54 | //NewSoftSerial *_serial;
55 | uint8_t * address; //address of struct
56 | uint8_t size; //size of struct
57 | uint8_t * rx_buffer; //address for temporary storage and parsing buffer
58 | uint8_t rx_array_inx; //index for RX parsing buffer
59 | uint8_t rx_len; //RX packet length according to the packet
60 | uint8_t calc_CS; //calculated Chacksum
61 | };
62 |
63 |
64 |
65 | #endif
66 |
--------------------------------------------------------------------------------
/EasyTransferVirtualWire/EasyTransferVirtualWire.cpp:
--------------------------------------------------------------------------------
1 | #include "EasyTransferVirtualWire.h"
2 | #include
3 |
4 | //so to make this easy, I'm just making my library be another data
5 | // layer on top of Virtual wire.
6 |
7 |
8 | //Captures address and size of struct
9 | void EasyTransferVirtualWire::begin(uint8_t * ptr, uint8_t length) { //HardwareSerial *theSerial){
10 | address = ptr;
11 | size = length;
12 | //_serial = theSerial;
13 | }
14 |
15 | //Sends out struct in binary, with header, length info and checksum
16 | void EasyTransferVirtualWire::sendData(){
17 |
18 | //temp storage place
19 | uint8_t temp_buffer[size+4];
20 |
21 | uint8_t CS = size;
22 | temp_buffer[0] = 0x06;
23 | temp_buffer[1] = 0x85;
24 | temp_buffer[2] = size;
25 |
26 | for(int i = 0; i
19 | *
20 | *This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
21 | *To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or
22 | *send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
23 | ******************************************************************/
24 | #ifndef EasyTransferVirtualWire_h
25 | #define EasyTransferVirtualWire_h
26 |
27 |
28 | //make it a little prettier on the front end.
29 | #define details(name) (byte*)&name,sizeof(name)
30 |
31 | //Not neccessary, but just in case.
32 | #if ARDUINO > 22
33 | #include "Arduino.h"
34 | #else
35 | #include "WProgram.h"
36 | #endif
37 | #include
38 | //#include "HardwareSerial.h"
39 | //#include
40 | #include
41 | #include
42 | #include
43 | #include
44 |
45 | class EasyTransferVirtualWire {
46 | public:
47 | void begin(uint8_t *, uint8_t);
48 | //void begin(uint8_t *, uint8_t, NewSoftSerial *theSerial);
49 | void sendData();
50 | boolean receiveData();
51 | private:
52 | //HardwareSerial *_serial;
53 | //NewSoftSerial *_serial;
54 | uint8_t * address; //address of struct
55 | uint8_t size; //size of struct
56 | uint8_t rx_len; //RX packet length according to the packet
57 | uint8_t rx_array[255]; //RX packet parsing buffer
58 | uint8_t rx_array_inx; //index for RX parsing buffer
59 | uint8_t calc_CS; //calculated Chacksum
60 | };
61 |
62 |
63 |
64 | #endif
--------------------------------------------------------------------------------
/EasyTransferVirtualWire/examples/ETVirtualWireDemoRX/ETVirtualWireDemoRX.pde:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 |
5 | //create object
6 | EasyTransferVirtualWire ET;
7 |
8 | struct SEND_DATA_STRUCTURE{
9 | //put your variable definitions here for the data you want to send
10 | //THIS MUST BE EXACTLY THE SAME ON THE OTHER ARDUINO
11 | //Struct can'e be bigger then 26 bytes for VirtualWire version
12 | int16_t blinks;
13 | int16_t pause;
14 | };
15 |
16 | //give a name to the group of data
17 | SEND_DATA_STRUCTURE mydata;
18 |
19 | void setup(){
20 | //start the library, pass in the data details
21 | ET.begin(details(mydata));
22 |
23 | // Initialise the IO and ISR
24 | vw_set_ptt_inverted(true); // Required for DR3100
25 | vw_setup(2000); // Bits per sec
26 |
27 | vw_rx_start(); // Start the receiver PLL running
28 |
29 | pinMode(13, OUTPUT);
30 |
31 | randomSeed(analogRead(0));
32 |
33 | }
34 |
35 | void loop(){
36 | //check and see if a data packet has come in.
37 | if(ET.receiveData()){
38 | //this is how you access the variables. [name of the group].[variable name]
39 | //since we have data, we will blink it out.
40 | for(int i = mydata.blinks; i>0; i--){
41 | digitalWrite(13, HIGH);
42 | delay(mydata.pause * 100);
43 | digitalWrite(13, LOW);
44 | delay(mydata.pause * 100);
45 | }
46 | }
47 |
48 | //you should make this delay shorter then your transmit delay or else messages could be lost
49 | delay(250);
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/EasyTransferVirtualWire/examples/ETVirtualWireDemoTX/ETVirtualWireDemoTX.pde:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 |
5 | //create object
6 | EasyTransferVirtualWire ET;
7 |
8 | struct SEND_DATA_STRUCTURE{
9 | //put your variable definitions here for the data you want to send
10 | //THIS MUST BE EXACTLY THE SAME ON THE OTHER ARDUINO
11 | //Struct can'e be bigger then 26 bytes for VirtualWire version
12 | int16_t blinks;
13 | int16_t pause;
14 | };
15 |
16 | //give a name to the group of data
17 | SEND_DATA_STRUCTURE mydata;
18 |
19 | void setup(){
20 | //start the library, pass in the data details
21 | ET.begin(details(mydata));
22 |
23 | // Initialise the IO and ISR
24 | vw_set_ptt_inverted(true); // Required for DR3100
25 | vw_setup(2000); // Bits per sec
26 |
27 | pinMode(13, OUTPUT);
28 |
29 | randomSeed(analogRead(0));
30 |
31 | }
32 |
33 | void loop(){
34 | //this is how you access the variables. [name of the group].[variable name]
35 | mydata.blinks = random(5);
36 | mydata.pause = random(5);
37 | //send the data
38 | ET.sendData();
39 |
40 | //Just for fun, we will blink it out too
41 | for(int i = mydata.blinks; i>0; i--){
42 | digitalWrite(13, HIGH);
43 | delay(mydata.pause * 100);
44 | digitalWrite(13, LOW);
45 | delay(mydata.pause * 100);
46 | }
47 |
48 | delay(5000);
49 | }
50 |
51 |
--------------------------------------------------------------------------------
/EasyTransferVirtualWire/keywords.txt:
--------------------------------------------------------------------------------
1 | #######################################
2 | # Syntax Coloring Map EasyTransfer
3 | #######################################
4 |
5 | #######################################
6 | # Datatypes (KEYWORD1)
7 | #######################################
8 |
9 | EasyTransferVirtualWire KEYWORD1
10 |
11 | #######################################
12 | # Methods and Functions (KEYWORD2)
13 | #######################################
14 | sendData KEYWORD2
15 | receiveData KEYWORD2
16 | begin KEYWORD2
17 |
18 |
19 | #######################################
20 | # Constants (LITERAL1)
21 | #######################################
22 | details LITERAL1
23 |
--------------------------------------------------------------------------------
/I2C_Wiring.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaulStoffregen/Arduino-EasyTransfer/d329cd6a665a8cec38c4b28cd9a72d455e7f69bd/I2C_Wiring.png
--------------------------------------------------------------------------------
/README.txt:
--------------------------------------------------------------------------------
1 | /******************************************************************
2 | * EasyTransfer Arduino Library v2.1
3 | * details and example sketch:
4 | * http://www.billporter.info/easytransfer-arduino-library/
5 | *
6 | * Brought to you by:
7 | * Bill Porter
8 | * www.billporter.info
9 | *
10 | * Major props to Mathieu Alorent (kumy) for
11 | * I2C version and the pretty pictures.
12 | *
13 | *
14 | * Lib version history
15 | * 1.0 Created
16 | * 1.1 Fixed dumb Copy-paste error in header file
17 | * Added a keyword file
18 | * 1.5 Forked lib into Software and Hardware Serial branches, I don't know a better way
19 | * added passing in of Serial port of different types
20 | * 1.6 Fixed bug where it wasn't clearing out the buffers if the CheckSum failed,
21 | * I'm good at dumb mistakes
22 | * 1.7 Fixed a bug where the receive function could block for too long and never process data correctly
23 | * Organized the examples to be Arduino IDE compatible
24 | * 1.8
25 | * Now Arduino 1.0 compatible!
26 | * 1.81
27 | * Made it more cross compatible. Man, They really made us work for this one.
28 | * 2.0
29 | * Combined SoftEasyTransfer with the other two to make everything one repo
30 | * Added EasyTransferVirtualWire library for use with Virtual Wire and cheap radios.
31 | * 2.0.1
32 | * VirtualWire version tested by garth@netram, bugs fixed.
33 | * 2.1
34 | * Changes RX parsing buffer to dynamic allocation to conserve RAM.
35 | *
36 | *
37 | * Limits of the Library
38 | * You can change the Serial port,
39 | * but the Struct size must not pass 255 bytes
40 | * VirtualWire Version Struct can'e be bigger then 26 bytes
41 | *
42 | * The protcol is as follows:
43 | * Header(0x06,0x85),SizeofPayload,Payload,Checksum
44 | *
45 | *
46 | *This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or(at your option) any later version.
47 | This program is distributed in the hope that it will be useful,
48 | but WITHOUT ANY WARRANTY; without even the implied warranty of
49 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50 | GNU General Public License for more details.
51 |
52 | *
53 | *This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
54 | *To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or
55 | *send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
56 | ******************************************************************/
57 |
58 |
59 | ********************To Install*************************************
60 |
61 | To install, unzip and place 'EasyTransfer' folder into your 'C:\Users\{user name}\Documents\Arduino\libraries' folder or '{Arduino IDE path}\hardware\libraries" or {Arduino IDE path}\libraries" directory.
62 |
63 | Restart the Arduino IDE, look for the Library under "Sketch" -> "Import Library". You can also try the examples by finding them
64 | under "File" -> "Examples" -> "EasyTransfer".
65 |
66 | All uses of the library are in the example sketchs.
67 |
68 |
69 | *******************************************************************
70 |
71 |
72 | Library now has two versions, one for regular hardware Serial, one for use with the NewSoftSerial library
73 | making any Arduino pin capable of transfering data back and forth easily.
74 |
75 | See the examples to find out how to use the library.
--------------------------------------------------------------------------------
/SoftEasyTransfer/SoftEasyTransfer.cpp:
--------------------------------------------------------------------------------
1 | #include "SoftEasyTransfer.h"
2 |
3 |
4 |
5 |
6 | #if ARDUINO > 22
7 | //Captures address and size of struct
8 | void SoftEasyTransfer::begin(uint8_t * ptr, uint8_t length, SoftwareSerial *theSerial){
9 | address = ptr;
10 | size = length;
11 | _serial = theSerial;
12 |
13 | //dynamic creation of rx parsing buffer in RAM
14 | rx_buffer = (uint8_t*) malloc(size);
15 | }
16 |
17 | #else
18 | //Captures address and size of struct
19 | void SoftEasyTransfer::begin(uint8_t * ptr, uint8_t length, NewSoftSerial *theSerial){
20 | address = ptr;
21 | size = length;
22 | _serial = theSerial;
23 |
24 | //dynamic creation of rx parsing buffer in RAM
25 | rx_buffer = (uint8_t*) malloc(size);
26 | }
27 |
28 | #endif
29 |
30 | #if ARDUINO > 22
31 | //Sends out struct in binary, with header, length info and checksum
32 | void SoftEasyTransfer::sendData(){
33 | uint8_t CS = size;
34 | _serial->write(0x06);
35 | _serial->write(0x85);
36 | _serial->write(size);
37 | for(int i = 0; iwrite(*(address+i));
40 | }
41 | _serial->write(CS);
42 |
43 | }
44 | #else
45 | //Sends out struct in binary, with header, length info and checksum
46 | void SoftEasyTransfer::sendData(){
47 | uint8_t CS = size;
48 | _serial->print(0x06, BYTE);
49 | _serial->print(0x85, BYTE);
50 | _serial->print(size, BYTE);
51 | for(int i = 0; iprint(*(address+i), BYTE);
54 | }
55 | _serial->print(CS, BYTE);
56 |
57 | }
58 | #endif
59 |
60 | boolean SoftEasyTransfer::receiveData(){
61 |
62 | //start off by looking for the header bytes. If they were already found in a previous call, skip it.
63 | if(rx_len == 0){
64 | //this size check may be redundant due to the size check below, but for now I'll leave it the way it is.
65 | if(_serial->available() >= 3){
66 | //this will block until a 0x06 is found or buffer size becomes less then 3.
67 | while(_serial->read() != 0x06) {
68 | //This will trash any preamble junk in the serial buffer
69 | //but we need to make sure there is enough in the buffer to process while we trash the rest
70 | //if the buffer becomes too empty, we will escape and try again on the next call
71 | if(_serial->available() < 3)
72 | return false;
73 | }
74 | if (_serial->read() == 0x85){
75 | rx_len = _serial->read();
76 | //make sure the binary structs on both Arduinos are the same size.
77 | if(rx_len != size){
78 | rx_len = 0;
79 | return false;
80 | }
81 | }
82 | }
83 | }
84 |
85 |
86 |
87 | if(rx_len != 0){
88 | while(_serial->available() && rx_array_inx <= rx_len){
89 | rx_buffer[rx_array_inx++] = _serial->read();
90 | }
91 |
92 | if(rx_len == (rx_array_inx-1)){
93 | //seem to have got whole message
94 | //last uint8_t is CS
95 | calc_CS = rx_len;
96 | for (int i = 0; i
19 | *
20 | *This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
21 | *To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or
22 | *send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
23 | ******************************************************************/
24 | #ifndef SoftEasyTransfer_h
25 | #define SoftEasyTransfer_h
26 |
27 |
28 | //make it a little prettier on the front end.
29 | #define details(name) (byte*)&name,sizeof(name)
30 |
31 | //Not neccessary, but just in case.
32 | #if ARDUINO > 22
33 | #include "Arduino.h"
34 | #include
35 | #else
36 | #include "WProgram.h"
37 | #include
38 | #endif
39 | //#include "HardwareSerial.h"
40 |
41 |
42 | #include
43 | #include
44 | #include
45 | #include
46 |
47 | class SoftEasyTransfer {
48 | public:
49 | //void begin(uint8_t *, uint8_t, HardwareSerial *theSerial);
50 | #if ARDUINO > 22
51 | void begin(uint8_t *, uint8_t, SoftwareSerial *theSerial);
52 | #else
53 | void begin(uint8_t *, uint8_t, NewSoftSerial *theSerial);
54 | #endif
55 | void sendData();
56 | boolean receiveData();
57 | private:
58 | //HardwareSerial *_serial;
59 |
60 | #if ARDUINO > 22
61 | SoftwareSerial *_serial;
62 | #else
63 | NewSoftSerial *_serial;
64 | #endif
65 |
66 |
67 | uint8_t * address; //address of struct
68 | uint8_t size; //size of struct
69 | uint8_t * rx_buffer; //address for temporary storage and parsing buffer
70 | uint8_t rx_array_inx; //index for RX parsing buffer
71 | uint8_t rx_len; //RX packet length according to the packet
72 | uint8_t calc_CS; //calculated Chacksum
73 | };
74 |
75 |
76 |
77 | #endif
--------------------------------------------------------------------------------
/SoftEasyTransfer/examples/SoftEasyTransfer_RX_Example/SoftEasyTransfer_RX_Example.pde:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | /* For Arduino 1.0 and newer, do this: */
4 | #include
5 | SoftwareSerial mySerial(2, 3);
6 |
7 | /* For Arduino 22 and older, do this: */
8 | //#include
9 | //NewSoftSerial mySerial(2, 3);
10 |
11 |
12 | //create object
13 | SoftEasyTransfer ET;
14 |
15 | struct RECEIVE_DATA_STRUCTURE{
16 | //put your variable definitions here for the data you want to receive
17 | //THIS MUST BE EXACTLY THE SAME ON THE OTHER ARDUINO
18 | int16_t blinks;
19 | int16_t pause;
20 | };
21 |
22 | //give a name to the group of data
23 | RECEIVE_DATA_STRUCTURE mydata;
24 |
25 | void setup(){
26 | mySerial.begin(9600);
27 | //start the library, pass in the data details and the name of the serial port.
28 | ET.begin(details(mydata), &mySerial);
29 |
30 | pinMode(13, OUTPUT);
31 |
32 | }
33 |
34 | void loop(){
35 | //check and see if a data packet has come in.
36 | if(ET.receiveData()){
37 | //this is how you access the variables. [name of the group].[variable name]
38 | //since we have data, we will blink it out.
39 | for(int i = mydata.blinks; i>0; i--){
40 | digitalWrite(13, HIGH);
41 | delay(mydata.pause * 100);
42 | digitalWrite(13, LOW);
43 | delay(mydata.pause * 100);
44 | }
45 | }
46 | //you should make this delay shorter then your transmit delay or else messages could be lost
47 | delay(250);
48 | }
49 |
--------------------------------------------------------------------------------
/SoftEasyTransfer/examples/SoftEasyTransfer_TX_Example/SoftEasyTransfer_TX_Example.pde:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | /* For Arduino 1.0 and newer, do this: */
4 | #include
5 | SoftwareSerial mySerial(2, 3);
6 |
7 | /* For Arduino 22 and older, do this: */
8 | //#include
9 | //NewSoftSerial mySerial(2, 3);
10 |
11 |
12 |
13 | //create object
14 | SoftEasyTransfer ET;
15 |
16 | struct SEND_DATA_STRUCTURE{
17 | //put your variable definitions here for the data you want to send
18 | //THIS MUST BE EXACTLY THE SAME ON THE OTHER ARDUINO
19 | int16_t blinks;
20 | int16_t pause;
21 | };
22 |
23 | //give a name to the group of data
24 | SEND_DATA_STRUCTURE mydata;
25 |
26 | void setup(){
27 | mySerial.begin(9600);
28 | //start the library, pass in the data details and the name of the serial port.
29 | ET.begin(details(mydata), &mySerial);
30 |
31 | pinMode(13, OUTPUT);
32 |
33 | randomSeed(analogRead(0));
34 |
35 | }
36 |
37 | void loop(){
38 | //this is how you access the variables. [name of the group].[variable name]
39 | mydata.blinks = random(5);
40 | mydata.pause = random(5);
41 | //send the data
42 | ET.sendData();
43 |
44 | //Just for fun, we will blink it out too
45 | for(int i = mydata.blinks; i>0; i--){
46 | digitalWrite(13, HIGH);
47 | delay(mydata.pause * 100);
48 | digitalWrite(13, LOW);
49 | delay(mydata.pause * 100);
50 | }
51 |
52 | delay(5000);
53 | }
54 |
--------------------------------------------------------------------------------
/SoftEasyTransfer/keywords.txt:
--------------------------------------------------------------------------------
1 | #######################################
2 | # Syntax Coloring Map EasyTransfer
3 | #######################################
4 |
5 | #######################################
6 | # Datatypes (KEYWORD1)
7 | #######################################
8 |
9 | SoftEasyTransfer KEYWORD1
10 |
11 | #######################################
12 | # Methods and Functions (KEYWORD2)
13 | #######################################
14 | sendData KEYWORD2
15 | receiveData KEYWORD2
16 | begin KEYWORD2
17 |
18 |
19 | #######################################
20 | # Constants (LITERAL1)
21 | #######################################
22 | details LITERAL1
23 |
--------------------------------------------------------------------------------
/UARTS_Wiring.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaulStoffregen/Arduino-EasyTransfer/d329cd6a665a8cec38c4b28cd9a72d455e7f69bd/UARTS_Wiring.png
--------------------------------------------------------------------------------