2021-01-29 06:31:58 -05:00
|
|
|
//
|
|
|
|
// FILE: DEVRANDOM_demo.ino
|
|
|
|
// AUTHOR: Rob Tillaart
|
|
|
|
// VERSION: 0.1.0
|
|
|
|
// PURPOSE: demo
|
|
|
|
// DATE: 2020-06-23
|
|
|
|
// (c) : MIT
|
|
|
|
//
|
|
|
|
|
|
|
|
// USE WITH SERIAL PLOTTER
|
|
|
|
|
2021-12-15 13:48:19 -05:00
|
|
|
|
2021-01-29 06:31:58 -05:00
|
|
|
#include "DEVRANDOM.h"
|
|
|
|
|
|
|
|
DEVRANDOM dr;
|
|
|
|
|
|
|
|
volatile int x, y, z;
|
|
|
|
|
2021-12-15 13:48:19 -05:00
|
|
|
|
2021-01-29 06:31:58 -05:00
|
|
|
void setup()
|
|
|
|
{
|
|
|
|
Serial.begin(115200);
|
|
|
|
Serial.println(__FILE__);
|
|
|
|
Serial.println();
|
|
|
|
|
|
|
|
Serial.println("SOFTWARE\tDIGITAL\tANALOG");
|
|
|
|
}
|
|
|
|
|
2021-12-15 13:48:19 -05:00
|
|
|
|
2021-01-29 06:31:58 -05:00
|
|
|
void loop()
|
|
|
|
{
|
|
|
|
dr.useSW();
|
|
|
|
x = dr.read();
|
|
|
|
dr.useHW(4);
|
|
|
|
x = dr.read();
|
|
|
|
dr.useAR(A0);
|
|
|
|
x = dr.read();
|
|
|
|
|
|
|
|
Serial.print(x);
|
|
|
|
Serial.print("\t");
|
|
|
|
Serial.print(y);
|
|
|
|
Serial.print("\t");
|
|
|
|
Serial.print(z);
|
|
|
|
Serial.println();
|
|
|
|
}
|
|
|
|
|
2021-12-15 13:48:19 -05:00
|
|
|
|
2021-01-29 06:31:58 -05:00
|
|
|
// -- END OF FILE --
|
2021-12-15 13:48:19 -05:00
|
|
|
|