-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated license information and added donation information
- Loading branch information
Showing
13 changed files
with
178 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,52 @@ | ||
# DLTMultimeter | ||
# DLTRelais | ||
|
||
The SW DLTRelais is used to control Relais for Test Automation. | ||
It is based on a SW for the Arduino SW for the Wemos Mini D1 platform. | ||
It provides an interface to DLT for Logging and Test Automation. | ||
|
||
For further information about DLT visit the DLT Viewer project: | ||
|
||
https://github.com/GENIVI/dlt-viewer | ||
|
||
## Donation | ||
|
||
If you find my SW useful and you want to donate my work please select one of the following donations: | ||
|
||
Github Sponsors: | ||
|
||
https://github.com/sponsors/alexmucde | ||
|
||
Paypal Donation: | ||
|
||
https://www.paypal.com/donate?hosted_button_id=YBWSNXYWJJP2Q | ||
|
||
## Ardunio SW | ||
|
||
The currently sused Arduino SW can be found in the folder Arduino/DLTRelais/DLTRelais.ino | ||
|
||
The Arduino SW is based on the Wemos Library. | ||
|
||
https://github.com/alexmucde/WemosLibrary | ||
|
||
Copy the Wemos Library into the Arduino Libraries folder before compiling the DLTRelais.ino sketch. | ||
|
||
## Installation | ||
|
||
To build this SW the Qt Toolchain must be used. | ||
|
||
## Usage | ||
|
||
DLTRelais.exe | ||
|
||
|
||
## Contributing | ||
|
||
Contibutions are always welcome! Please provide a Pull Request on Github. | ||
|
||
https://github.com/alexmucde/DLTRelais | ||
|
||
## Copyright | ||
|
||
Alexander Wenzel <[email protected]> | ||
|
||
This code is licensed under GPLv3. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
#include <WButton.h> | ||
#include <WLed.h> | ||
#include <WRelais.h> | ||
#include <WSerial.h> | ||
|
||
WButton button; | ||
WLed led; | ||
WRelais relais1(D1); | ||
WRelais relais2(D2); | ||
WRelais relais3(D6); | ||
WSerial serial; | ||
|
||
void setup() | ||
{ | ||
serial.setup(); | ||
button.setup(); | ||
led.setup(); | ||
relais1.setup(); | ||
relais2.setup(); | ||
relais3.setup(); | ||
} | ||
|
||
void loop() | ||
{ | ||
relais1.loop(); | ||
relais2.loop(); | ||
relais3.loop(); | ||
|
||
switch(button.event()) | ||
{ | ||
case WButton::Pressed: | ||
led.on(); | ||
break; | ||
case WButton::ShortPress: | ||
relais1.trigger(500); | ||
break; | ||
case WButton::LongPress: | ||
relais2.toggle(); | ||
break; | ||
case WButton::Released: | ||
led.off(); | ||
break; | ||
} | ||
|
||
switch(serial.event()) | ||
{ | ||
case WSerial::Line: | ||
String text = serial.line(); | ||
if(text[0]=='D') | ||
{ | ||
if(text[1]=='1') | ||
{ | ||
if(text[2]=='0') | ||
{ | ||
relais1.off(); | ||
} | ||
else if(text[2]=='1') | ||
{ | ||
relais1.on(); | ||
} | ||
else if(text[2]=='T') | ||
{ | ||
relais1.trigger(500); | ||
} | ||
} | ||
if(text[1]=='2') | ||
{ | ||
if(text[2]=='0') | ||
{ | ||
relais2.off(); | ||
} | ||
else if(text[2]=='1') | ||
{ | ||
relais2.on(); | ||
} | ||
else if(text[2]=='T') | ||
{ | ||
relais2.trigger(500); | ||
} | ||
} | ||
if(text[1]=='6') | ||
{ | ||
if(text[2]=='0') | ||
{ | ||
relais3.off(); | ||
} | ||
else if(text[2]=='1') | ||
{ | ||
relais3.on(); | ||
} | ||
else if(text[2]=='T') | ||
{ | ||
relais3.trigger(500); | ||
} | ||
} | ||
} | ||
break; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters