Go Down

Topic: LED constantly on during PhysicalPixel example (Read 1 time) previous topic - next topic

killfor2

Hi guys, pretty new here, so apologies if I have offended anyone.

So I just got a Arduino Mega 2560 board, and was tinkering with it for a few days, and decided to try out the PhysicalPixel example.

So for a heads up, i'm not using any 220 Ohms resistors and directly plugging in the LED, so correct me if I REALLY need that.

Anyway, I load up the example in Arduino program and loaded the arduino sketch into my arduino board, and also loaded the processing example into a processing2.1.1

After setting my serial port to [1] (i have to coms COM1 and COM5), I ran the processing, but right when i ran it, my led lights up immediately and doesn't respond to anything when I hover over the box.

Is there something I missed?

killfor2

So after more tinkering, I tried testing with the Serial Monitor, and it seems pretty fine.
Typing in 'H' makes my LED light up;
Typing in 'L' switches it off.

However when i port the remaining processing code from bottom and run it, it stills lights up whenever i run the processing code.

I found out that removing the : port.write('L')  makes it "half" working, where not moving across the square will not light up the LED, but now I have to find a way to tell the board to turn of the LED.

Any help is welcomed.

Thanks.

Paul__B


So for a heads up, I'm not using any 220 Ohms resistors and directly plugging in the LED, so correct me if I REALLY need that.


What is it you are smoking?  By what feat of prestidigitation do you now imagine that the space time continuum has been altered such that the laws of physics do not apply in your local environment and you do not need a 220 ohm resistor when it is specified that you need one?

It did occur to me to suggest that you try the Serial Monitor, and you have and it works.  I am not familiar with "Processing" which is clearly now the problem here, so cannot help you there much.  Did you modify something other than the port number?  Does the box highlight as you mouse over it?

killfor2



What is it you are smoking?  By what feat of prestidigitation do you now imagine that the space time continuum has been altered such that the laws of physics do not apply in your local environment and you do not need a 220 ohm resistor when it is specified that you need one?


Well, the hardware requirements doesn't say i needed a 220 resistor, it only showed up on the schematics. And also later on I did a parallel connection of 4 1K ohm resistors to roughly get close to 220 because i simply don't have a 220 lying around freely and need to drive a good 20 minutes just to get a 220 resistor. Thanks for the reminder though.


It did occur to me to suggest that you try the Serial Monitor, and you have and it works.  I am not familiar with "Processing" which is clearly now the problem here, so cannot help you there much.  Did you modify something other than the port number?  Does the box highlight as you mouse over it?

Other than the port? nothing at all. And the box does highlight when i mouse over it, but it just doesn't send the 'L'  letter back, although I clearly see the TX light blinking rapidly all the way through.

Paul__B


Well, the hardware requirements doesn't say I needed a 220 resistor, it only showed up on the schematics. And also later on I did a parallel connection of 4 1K ohm resistors to roughly get close to 220 because i simply don't have a 220 lying around freely and need to drive a good 20 minutes just to get a 220 resistor. Thanks for the reminder though.


What "hardware requirements" would these be and where would you find them?  The resistor certainly is - as I suspect you observed, shown in the example picture.

The fact is, you always need a current limiting device to connect a LED to a power (voltage) source, and this is no exception.  Now that limiting device might be a resistor, a specially crafted current control circuit (as you use for higher power LEDs) or a resistor integrated into the LED itself.  There are some "tricks", such as those pocket lights using a couple of coin cells and an LED whose legs when squeezed, contact the cells directly, but that relies on the inability of the cells to provide more than a certain amount of current.

Oh, and for testing, no need to fuss about the resistors - a 1k resistor will do just fine on its own, the LED will simply not be as bright - you do not have to have maximum brightness.


And the box does highlight when i mouse over it, but it just doesn't send the 'L'  letter back, although I clearly see the TX light blinking rapidly all the way through.


Sounds as if there is some problem either with the baudrate, or this is one of the cases where there is an error in the "examples" and this would be far from the first time that has happened.  I have yet to learn "processing" so I am of little help here and with all good intentions, I probably cannot find the time to do so at this moment.  I must suspect that the fact that no-one else has chimed in with the solution, implies that it is not particularly popular with those who contribute here.


killfor2



Sounds as if there is some problem either with the baudrate, or this is one of the cases where there is an error in the "examples" and this would be far from the first time that has happened.  I have yet to learn "processing" so I am of little help here and with all good intentions, I probably cannot find the time to do so at this moment.  I must suspect that the fact that no-one else has chimed in with the solution, implies that it is not particularly popular with those who contribute here.



Ok, thanks for the info again. Maybe i'll have better luck at some other more appropriate forum branches.

Go Up