Hi Arduinophiles!
I am having a very basic issue:
I have just set up my wiring by directly driving my P modell driver with 2n222´s without a pot.
Unfortunately I don´t have a 10v power supply but a 9v one which gives me 8,9V at the output. When I directly hook up the power supply to the white and blue cable of the Meanwell (without 2n222s and without arduino) I get a very bright light on both channels, white and blue.
So far soo god.
Then, I tried to hook up my arduino on pin 3 and 11 and I can power on and off the channels by doing an analogWrite(3, x); and analogWrite(11, x);
The threshold between no power at all and lights on seems to be arround an x value of 35. But now, I have the following problem:
void setup() {
pinMode(11, OUTPUT);
}
void loop() {
analogWrite(11, 40);
delay(5000);
analogWrite(11, 255);
Should switch from low dimming to high dimming every five seconds, but it doesn´t!
It just leaves the light on at the same value, while
void loop() {
analogWrite(11, 20);
delay(5000);
analogWrite(11, 255);
Turns the light on and off every five seconds due to 20 being below the threshold.
What´s the problem here? Can it be the voltage being too low? But I have seen people here also using 9v instead of 10 even on the P modell.
Can I get help please??
Hi Arduinophiles!
I am having a very basic issue:
I have just set up my wiring by directly driving my P modell driver with 2n222´s without a pot.
Unfortunately I don´t have a 10v power supply but a 9v one which gives me 8,9V at the output. When I directly hook up the power supply to the white and blue cable of the Meanwell (without 2n222s and without arduino) I get a very bright light on both channels, white and blue.
So far soo god.
Then, I tried to hook up my arduino on pin 3 and 11 and I can power on and off the channels by doing an analogWrite(3, x); and analogWrite(11, x);
The threshold between no power at all and lights on seems to be arround an x value of 35. But now, I have the following problem:
void setup() {
pinMode(11, OUTPUT);
}
void loop() {
analogWrite(11, 40);
delay(5000);
analogWrite(11, 255);
Should switch from low dimming to high dimming every five seconds, but it doesn´t!
It just leaves the light on at the same value, while
void loop() {
analogWrite(11, 20);
delay(5000);
analogWrite(11, 255);
Turns the light on and off every five seconds due to 20 being below the threshold.
What´s the problem here? Can it be the voltage being too low? But I have seen people here also using 9v instead of 10 even on the P modell.
Can I get help please??
12 on each String... but I am concerned that the issue is related to my power supply for the PWM only delivering 9V. Is that possible?How many LEDs in the string?
That was wierd it double posted but i think i found the sketch to run my stevesleds drivers.
http://shanes.net/?p=91
Moncapitane,
Use the sketch inside the rtc library to set your rtc. Once it is set it will be good to go for further sketches.
Which RTC library has them? All the libraries I have been downloading seem to not work with Arduino 1.0.1 nor 1.0.
#include <Wire.h>
#include "RTClib.h"
RTC_DS1307 RTC;
unsigned char i2cAddress = 0x4C; // LCD module I2C address
void setup ()
{
Serial.begin(9600);
Wire.begin();
RTC.begin();
if (! RTC.isrunning()) {
Serial.println("RTC is NOT running!");
// following line sets the RTC to the date & time this sketch was compiled
RTC.adjust(DateTime(__DATE__, __TIME__));
}}
void loop (){
DateTime now = RTC.now(); // Get time from RTC
//Serial.print (dayMinute); // Output the variable value to the serial port so I can see if it is correct. Yes, an usless comment
Serial.print(now.year(), DEC);
Serial.print('/');
Serial.print(now.month(), DEC);
Serial.print('/');
Serial.print(now.day(), DEC);
Serial.print(' ');
Serial.print(now.hour(), DEC);
Serial.print(':');
Serial.print(now.minute(), DEC);
Serial.print(':');
Serial.print(now.second(), DEC);
Serial.println();
}