Hello All,
I have a quick question on PWM.
i made a "Ao" analog out and "ChanAo"
& connected them
and gave it a reference to pin 8 "number.... 8"
see attached PNG for the settings
i also set up a slider that is tied to "Av" that is connected to the "ChanAo "
so i can manually move it up and down to make the PWM work
slider goes from 0 - 255
it doesn't seem to be working.
i even went into the arduino code and added a
"pinMode" to make sure that pin8 was on, and set to "OUTPUT"
The Arduino test code works fine. The solennoids click on, then slowly close up.
(see below)
any ideas on what i did wrong??
How i get the Proview slider to control the Solenoids?
thanks guys!
Happy equinox, and happy solar eclipse! i am in usa, so didn't see it.. was it good?
================
arduino test for PWM code
http://arduino.cc/en/Tutorial/Fading
This example code is in the public domain.
*/
int ledPinA = 8;
int ledPin = 9; // LED connected to digital pin 9
void setup() {
// nothing happens in setup
}
void loop() {
// fade in from min to max in increments of 5 points:
for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) {
// sets the value (range from 0 to 255):
analogWrite(ledPin, fadeValue);
// wait for 30 milliseconds to see the dimming effect
delay(30);
}
// fade out from max to min in increments of 5 points:
for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) {
// sets the value (range from 0 to 255):
analogWrite(ledPin, fadeValue);
// wait for 30 milliseconds to see the dimming effect
delay(30);
}
// fade in from min to max in increments of 5 points:
for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) {
// sets the value (range from 0 to 255):
analogWrite(ledPinA, fadeValue);
// wait for 30 milliseconds to see the dimming effect
delay(40);
}
// fade out from max to min in increments of 5 points:
for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) {
// sets the value (range from 0 to 255):
analogWrite(ledPinA, fadeValue);
// wait for 30 milliseconds to see the dimming effect
delay(40);
}
}