Node Sine generator


#1

Sine-Gen

I need help with this node, it seems very simple but I have errors when compiling.
It is based on the SinGen library https://github.com/findux/SinGen/tree/master/SinGen

Inputs

  • SL (port, default=D3) — pin PWM low
  • SH (port, default=D5) — pin PWM high
  • Hz (number, default=1) — determines the frequency
  • INIT (pulse, default= Never) — start the generator
  • UPD (pulse, default= Never) — update

Outputs

  • OUT (number) — Output signal SH, for internal use
  • DONE (pulse)

The node must generate through PWM, two sinusoidal signals opposite each other, the frequency is determined by Hz

The characteristics are according to what I could understand about the library, I do not know if it is correct.

Sine


#2

Hey cesars
I am looking in to it :smile:
Let you know when it is done.


#3

@bradzilla84 :clap::clap: thanks!


#4

Hey cesars
Take a look at this.
https://xod.io/libs/bradzilla84/singen/
Gen is easy but the Library doesn’t seam to have a good way the get the value out without altering it.


#5

Hi, now I will look at it, but the alternative generation is automatic, it is already incorporated with pinYuksekPWM and pinAlcakPWM.
SinGen(uint8_t pinYuksekPWM = 3, uint8_t pinAlcakPWM = 5, double HzFrekans = 1);


#6

oh, I see what happens, there is a flicker in the second signal, something that does not happen in the arduino sketch


#7

Yeah continuous in XOD is not the same as in Arduino. There is a slight delay while all other nodes are processed. I’m sure there is a way around this I have another patch I’m working on with the same issue.


#8

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.