GY-63_MS5611/libraries/FunctionGenerator
2021-05-28 13:17:38 +02:00
..
.github/workflows add arduino-lint 2021-05-28 13:17:38 +02:00
examples 2021-01-29 2021-01-29 12:31:58 +01:00
test 2021-01-29 2021-01-29 12:31:58 +01:00
.arduino-ci.yml 2021-01-29 2021-01-29 12:31:58 +01:00
functionGenerator.cpp 2021-01-29 2021-01-29 12:31:58 +01:00
FunctionGenerator.h 2021-01-29 2021-01-29 12:31:58 +01:00
keywords.txt update libraries E-I 2020-11-27 11:16:22 +01:00
library.json add arduino-lint 2021-05-28 13:17:38 +02:00
library.properties 2021-01-29 2021-01-29 12:31:58 +01:00
LICENSE 2021-01-29 2021-01-29 12:31:58 +01:00
readme.md 2021-01-29 2021-01-29 12:31:58 +01:00

Arduino CI License: MIT GitHub release

FunctionGenerator

Arduino library to generate wave forms (nummeric) for a DAC

Description

TODO.

Interface

Constructor

  • funcgen(float period = 1.0, float amplitude = 1.0, float phase = 0.0, float yShift = 0.0) All parameters can be set in the constructor but also later in configuration.

Configuration

  • void setPeriod(float period = 1.0) // seconds
  • float getPeriod
  • void setFrequency(float freq = 1.0) // Hertz
  • float getFrequency()
  • void setAmplitude(float ampl = 1.0) // -
  • float getAmplitude()
  • void setPhase(float phase = 0.0) // phase of period
  • float getPhase()
  • void setYShift(float yShift = 0.0) // shift in amplitude, zero point.
  • float getYShift()

Wave forms

t is time in seconds

  • float sawtooth(float t)
  • float triangle(float t)
  • float square(float t)
  • float sinus(float t)
  • float stair(float t, uint16_t steps = 8)
  • float random()
  • float line()
  • float zero()

Line() and zero() are functions that can be used to drive a constant voltage from a DAC and can be used to calibrate the generator / DAC combination.

Operational

See examples.

TODO

ideas for the future...

  • example with DAC. 8 12 16 bit.
  • example with potmeters for 4 parameters
  • RC function
  • Trapezium
  • Sawtooth reverse?
  • play "recording"