GY-63_MS5611/libraries/HeartBeat/examples/HeartBeat_sinus/HeartBeat_sinus.ino

37 lines
514 B
Arduino
Raw Normal View History

2021-01-29 06:31:58 -05:00
//
2022-07-27 06:53:36 -04:00
// FILE: HeartBeat_sinus.ino
2021-01-29 06:31:58 -05:00
// AUTHOR: Rob Tillaart
// PURPOSE: demo
#include "HeartBeat.h"
HeartBeat HB;
2021-05-28 07:30:27 -04:00
2021-01-29 06:31:58 -05:00
void setup()
{
Serial.begin(115200);
2022-07-27 06:53:36 -04:00
Serial.println();
2021-01-29 06:31:58 -05:00
Serial.println(__FILE__);
2022-07-27 06:53:36 -04:00
Serial.print("HEARTBEAT_LIB_VERSION: ");
2021-01-29 06:31:58 -05:00
Serial.println(HEARTBEAT_LIB_VERSION);
2021-11-02 12:26:51 -04:00
HB.begin(13, 1.0);
2021-01-29 06:31:58 -05:00
}
void loop()
{
HB.beat();
2021-11-02 12:26:51 -04:00
float frequency = 5 * (1 + sin(millis()/1000.0));
HB.setFrequency(frequency);
// Serial.println(frequency, 6);
2021-01-29 06:31:58 -05:00
// do other stuff here
}
2021-05-28 07:30:27 -04:00
// -- END OF FILE --