2021-01-29 06:31:58 -05:00
|
|
|
//
|
|
|
|
// FILE: SHEX_echo.ino
|
|
|
|
// AUTHOR: Rob Tillaart
|
2021-12-28 05:19:54 -05:00
|
|
|
// PURPOSE: demo SHEX hex dump class
|
2021-01-29 06:31:58 -05:00
|
|
|
// DATE: 2020-05-24
|
|
|
|
//
|
2021-12-28 05:19:54 -05:00
|
|
|
// this sketch echoes all incoming bytes back in hex dump format.
|
2022-05-28 05:28:52 -04:00
|
|
|
//
|
2021-01-29 06:31:58 -05:00
|
|
|
|
2021-12-28 05:19:54 -05:00
|
|
|
|
2021-01-29 06:31:58 -05:00
|
|
|
#include "SHEX.h"
|
|
|
|
|
|
|
|
// default Serial and length 16
|
|
|
|
SHEX shex;
|
|
|
|
|
|
|
|
// SHEX shex(&Serial, 8);
|
|
|
|
|
2021-12-28 05:19:54 -05:00
|
|
|
|
2021-01-29 06:31:58 -05:00
|
|
|
void setup()
|
|
|
|
{
|
|
|
|
Serial.begin(115200);
|
|
|
|
Serial.println(__FILE__);
|
2022-05-28 05:28:52 -04:00
|
|
|
Serial.print("SHEX_LIB_VERSION: ");
|
|
|
|
Serial.println(SHEX_LIB_VERSION);
|
2021-01-29 06:31:58 -05:00
|
|
|
}
|
|
|
|
|
2021-12-28 05:19:54 -05:00
|
|
|
|
2021-01-29 06:31:58 -05:00
|
|
|
void loop()
|
|
|
|
{
|
|
|
|
if (Serial.available())
|
|
|
|
{
|
|
|
|
char c = Serial.read();
|
|
|
|
shex.print(c);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-28 05:19:54 -05:00
|
|
|
|
2021-01-29 06:31:58 -05:00
|
|
|
// -- END OF FILE --
|
2021-12-28 05:19:54 -05:00
|
|
|
|