Added sender console app. Fixes #7
This commit is contained in:
parent
bbd03b56bb
commit
2dcae04869
7 changed files with 84 additions and 2 deletions
13
source/send/CMakeLists.txt
Normal file
13
source/send/CMakeLists.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
project(Send)
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
add_executable(${PROJECT_NAME}
|
||||
send.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
sender
|
||||
)
|
||||
|
22
source/send/send.cpp
Normal file
22
source/send/send.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include "sender.h"
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
std::cout << "Send" << std::endl;
|
||||
|
||||
Sender sender(27);
|
||||
|
||||
while (true)
|
||||
{
|
||||
unsigned int data = 23;
|
||||
|
||||
std::cout << "Sending: " << data << std::endl;
|
||||
|
||||
sender.send(data);
|
||||
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue