Show Posts
|
|
Pages: 1 [2] 3 4 ... 99
|
|
16
|
Using Arduino / LEDs and Multiplexing / Re: LED Graduation Cap
|
on: June 15, 2013, 11:01:18 am
|
I would much rather use my mega r3 plus, if only I knew how to wire it up to my matrix. I just don't know where to put the last six cathode columns and or how to modify the 8x8 program to control the 8x14 matrix.
I asked a few Replies ago how you have what you've got connected already. What pins are you using? Andrew's? He's using a PIC and you're using a Mega, so everyone ought to automagically know what you're doing? Why not Post the programme that you're using now?
|
|
|
|
|
17
|
Using Arduino / General Electronics / Re: Opto coupler wiring basic
|
on: June 15, 2013, 10:56:00 am
|
|
Why? Because "on" = high. Why? Because "on" = high? Lots of times, especially in industry, things are "tied high" and the active state is LOW.
Anyway, if you can't reconcile to that, with the attached drawing, when the opto-LED is on (conducting) then its output goes High. Don't use an internal pullup with it.
|
|
|
|
|
19
|
Using Arduino / LEDs and Multiplexing / Re: LED Graduation Cap
|
on: June 15, 2013, 08:12:25 am
|
So, the picture in your original post, you have something going there. It's using an Arduino Mega? You're not going to use that? What I was trying to get at before, suggesting that you re-scale your project to a 7 x 11 matrix, would require 18 output pins, which the Arduino Uno's microcontroller (ATmega328) is fully capable. Another thing that I dont have a full grasp of would be how to program the PIC18f4520 using the Arduino R3 mega?
I don't know anything about that. PIC isn't Arduino, it's PIC. They likely have their own programming hardware and so on. How is it that you came to understand that the Mega is used to programme PICs? I thought that graduation was last week, but if it's next week you may miss the boat.
|
|
|
|
|
22
|
Using Arduino / LEDs and Multiplexing / Re: LED Graduation Cap
|
on: June 14, 2013, 05:45:28 pm
|
An "R3" == Arduino Uno R3? "Andrew" has another 1000+ days till graduation - and it shows: "You should also have 16 2N 2222A transistors. 16 of your digital outputs will be used to control the transistors (connected to the gate) and the other 16 are directly connected to the cathodes. The collector of the transistors should be wired to +5V and the emitter to the anodes. A high signal to the transistor and a low signal to the cathode will allow current to flow through the LED. "I did not include any resistor into my circuit because I wanted maximum brightness over longevity of LED. Yes, the LED will probably burn out faster, but I wanted the brightness. Furthermore, I'm going to be scanning through the rows anyway, so the LEDs are really only on at most 1/16th of the time and not continuous operation. Well, that's the theory anyway." Well, he has the transistors wired as sacrificial pass transistors for the column anodes. So you enable the column and then dump the pixels for each row (LOW = "On"), and go for broke, flying by the seat of your flaming pants! I don't understand what you mean by Do I set the program to the rest of the pin outs or do I have to multiplex the entire display?
Why wouldn't you multiplex the entire display?
|
|
|
|
|
23
|
Using Arduino / LEDs and Multiplexing / Re: Decimal point with 4x7 and 7221
|
on: June 14, 2013, 05:27:25 pm
|
http://playground.arduino.cc/Main/LedControlThe setChar(addr,digit,value.dp)-function accepts a value of type char for the whole range of 7-bit ASCII encoding. Since the recognizable patterns are limited, most of the defined characters will be the <SPACE>-char. But there are quite a few characters that make sense on a 7-segment display. Here is the set of printable characters: 0 1 2 3 4 5 6 7 8 9 A a (prints upper case) B b (prints lower case) C c (prints lower case) D d (prints lower case) E e (prints upper case) F f (prints upper case) H h (prints upper case) L l (prints upper case) P p (prints upper case) - (the minus sign) ., (lights up the decimal-point) _ (the underscore) <SPACE> (the blank or space char)Does that mean just a decimal point for that "digit" and nothing else, 1 2 . 3 vs 1 2. 3 ?
|
|
|
|
|
24
|
Using Arduino / LEDs and Multiplexing / Re: LED Graduation Cap
|
on: June 14, 2013, 05:13:12 pm
|
|
How about a schematic of what you've done so far?
If you make it a 7 x 11 (characters: 5 x 7 's) you have the potential for 2 characters on screen (with 1 column space) as it scrolls (I presume). You'd present the rows' pixels and enable the Column (via its driver / transistor.)
|
|
|
|
|
28
|
Using Arduino / Programming Questions / Re: sendUpdate if different, but update not different
|
on: June 14, 2013, 03:48:24 pm
|
Make a boolean variable, flagBit -- void setup {} { boolean flagBit = false; }
void loop(){ if(Serial.available() > 0){ char c = Serial.read(); if(c == 'u'){ sendUpdate(); } } if(minute() == 0 || minute() == 15 || minute() == 30 || minute() == 45){ if(minute() != lastMinute){ flagBit = true; lastMinute = minute(); } } dRead0 = digitalRead(2); if(dRead0 != digitalRead(2)){ flagBit = true; } dRead1 = digitalRead(3); if(dRead1 != digitalRead(3)){ flagBit = true; } dRead2 = digitalRead(5); if(dRead2 != digitalRead(5)){ flagBit = true; } dRead3 = digitalRead(6); if(dRead3 != digitalRead(6)){ flagBit = true; } dRead4 = digitalRead(7); if(dRead4 != digitalRead(7)){ flagBit = true; } dRead5 = digitalRead(8); if(dRead5 != digitalRead(8)){ flagBit = true; } dRead6 = digitalRead(9); if(dRead6 != digitalRead(9)){ flagBit = true; } aRead0 = analogRead(0); aRead1 = analogRead(1); aRead2 = analogRead(2); aRead3 = analogRead(3); aRead4 = analogRead(4); aRead5 = analogRead(5); if (flagBit == true) { sendUpdate(); } }
void sendUpdate(){ flagBit = false; // if you get a connection, report back via serial: if (client.connect(server, 80)) { //Serial.println("connected"); // Make a HTTP request: client.print("GET /ktvl/telemetry/telemetry.php?key="); client.print(authKey); client.print("&id=test"); client.print("&d0="); client.print(dRead0); client.print("&d1="); client.print(dRead1); client.print("&d2="); client.print(dRead2); client.print("&d3="); client.print(dRead3); client.print("&d4="); client.print(dRead4); client.print("&d5="); client.print(dRead5); client.print("&d6="); client.print(dRead6); client.print("&a0="); client.print(aRead0); client.print("&a1="); client.print(aRead1); client.print("&a2="); client.print(aRead2); client.print("&a3="); client.print(aRead3); client.print("&a4="); client.print(aRead4); client.print("&a5="); client.print(aRead5); client.print("&ip="); client.print(Ethernet.localIP()); client.println(" HTTP/1.1"); client.println("Host: www.example.com"); client.println("Connection: close"); client.println(); client.stop(); Serial.println("Update sent to server..."); } else { // if you didn't get a connection to the server: Serial.println("connection failed"); } }
It checks (goes through) everything and then, it updates if anything warranted updating.
|
|
|
|
|
29
|
Using Arduino / Project Guidance / Re: Switching 12V lamp with BC337 transistor.
|
on: June 14, 2013, 03:31:03 pm
|
|
You Replied while I was Replying.
The cold resistance of such a lamp is going to be very low at start-up (resistance increases with temperature), perhaps enough to strain the transistor anyway. Depending what your goal (simply On/Off?) is, maybe you should consider a relay.
|
|
|
|
|
30
|
Using Arduino / Project Guidance / Re: Switching 12V lamp with BC337 transistor.
|
on: June 14, 2013, 03:16:07 pm
|
|
Get a new (as in "not previously used") transistor.
I guess the resistor at the top of the drawing is there in place of the lamp? Your picture doesn't show any connection between the breadboard common rail and the Arduino Ground.
> > > Still, the cold resistance of such a lamp is going to be very low at start-up (resistance increases with temperature), perhaps enough to strain the transistor anyway. Depending what your goal is, maybe you should consider a relay.
|
|
|
|
|