Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define RXD1 32
- #define TXD1 25
- #define EN_MODBUS 33
- #define serialModbus Serial1
- #define RXD2 17
- #define TXD2 16
- #define PKEY 5
- #define RST 4
- #define serialLTE Serial2
- void setup() {
- // put your setup code here, to run once:
- Serial.begin(115200);
- serialModbus.begin(9600, SERIAL_8N1, RXD1, TXD1);
- serialLTE.begin(9600, SERIAL_8N1, RXD2, TXD2);
- pinMode(EN_MODBUS, OUTPUT);
- pinMode(RST, OUTPUT);
- pinMode(PKEY, OUTPUT);
- digitalWrite(PKEY, LOW);
- digitalWrite(RST, HIGH);delay(1000);
- digitalWrite(RST, LOW);delay(1000);
- digitalWrite(RST, HIGH);delay(1000);
- digitalWrite(EN_MODBUS, HIGH);delay(1000);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement