yoelk / instrumentino

Instrumentino is an open-source modular graphical user interface framework for controlling Arduino based experimental instruments
GNU General Public License v3.0
138 stars 59 forks source link

PWM issues #6

Closed sinkfloridasink closed 9 years ago

sinkfloridasink commented 9 years ago

The example code I found was working with specific Parker products, I am trying to use PWM to control a pump.

I am wondering how to most basically set up a PWM pin location.

Thank you,

Josh

sinkfloridasink commented 9 years ago

I'm just trying to make one PWM pin be controllable from 0 - 5 V, I would love for it to be a parameter in a class. Thanks for any help,

Josh

sinkfloridasink commented 9 years ago

I guess the biggest issue is I am not understanding how SysVarAnalogUnipolar is working.

Why do I link the Analog pin to the PWM pin? This doesn't seem to make sense to me.

PWM is where a digital pin outputs its signal for a percentage of time. .5 means its on 50% of the time.

Why does Unipolar require a digital and an analog pin to work?

Thanks,

Josh Johnson

yoelk commented 9 years ago

Hi josh. I'm on vacation so havent checked my emails regularly. Sorry for the poor documentation, varunipolar is for a case when you read an analog signal and optionally set its value with pwm. I dont remember if i added support for write-only cases like yours, and i dont have the code in front of me. So you can either set the analog variable to whatever and ignore the read values, or you can write a class for write-only variables. I made something similar for labsmith pumps. Search the code for "cached variables" or something like that.

Joel

On Thursday, January 29, 2015, sinkfloridasink notifications@github.com wrote:

I guess the biggest issue is I am not understanding how SysVarAnalogUnipolar is working.

Why do I link the Analog pin to the PWM pin? This doesn't seem to make sense to me.

PWM is where a digital pin outputs its signal for a percentage of time. .5 means its on 50% of the time.

Why does Unipolar require a digital and an analog pin to work?

Thanks,

Josh Johnson

— Reply to this email directly or view it on GitHub.< https://ci5.googleusercontent.com/proxy/PumNxHAMBHOk4DDaho5v_RnmgflpH-OJ7d-aVhWlS0CaFDB5qAQ5leQDO-U8SH4fE07J_aEhcpSlVV9tvpIiHkPxKGip7QZnfxdEaRWq_Mp5dejl4JgLWyj_SpWL5hMoy96ZLGLvQWmETaPpRIRRW4OaZ58dYA=s0-d-e1-ft#https://github.com/notifications/beacon/AGTaG1J0X2ct0FhC3qzylCzhORWadOFDks5nmoPagaJpZM4DYjwC.gif

sinkfloridasink commented 9 years ago

Thank you by ignoring the other pin I got the PWM to work splendidly with my pump! You were very helpful. I am sorry to bother, I only have one more task to undertake but everything else has been working great. I greatly appreciate your work.

yoelk commented 9 years ago

Hi Josh, I'm happy it turned out well. And thank you for the complements!

If you're interested, I'm very happy to add co-developers for Instrumentino. When you feel like joining and adding some contributions (coding, commenting, etc.), please contact me again.

Have a nice week, Joel

On Fri, Jan 30, 2015 at 1:45 AM, sinkfloridasink notifications@github.com wrote:

Closed #6 https://github.com/yoelk/Instrumentino/issues/6.

— Reply to this email directly or view it on GitHub https://github.com/yoelk/Instrumentino/issues/6#event-227221473.