Show Posts
Pages: [1] 2 3 ... 79
1  Using Arduino / Programming Questions / Re: getting else without previous if error on: April 18, 2014, 08:50:44 pm
You have a semi-colon at the end of the line with if. That makes the else invalid.
2  Using Arduino / Displays / Re: Cant display 8 on my digit display when given the time interval!! on: April 18, 2014, 02:01:42 pm
Blinkwithoutdelay is more multitasking than multiplexing.

3  Using Arduino / Programming Questions / Re: Is a while loop embedded in if/else if legal? on: April 18, 2014, 12:32:36 pm
It is legal syntax. If it is not compiling it is because there is an error somewhere that you have not provided code for.

I am not sure what you are trying to achieve, though, because the same randNumber is being assigned to all your variables. Your loop generates the number a few times but overwrites the variable with each new number.
4  Using Arduino / Displays / Re: Cant display 8 on my digit display when given the time interval!! on: April 18, 2014, 12:26:33 pm
There are a bunch of basics that you need to get under your belt
- Dealing with digitals - reading/writing, pullup/pulldown resistors, using switches
- Dealing with analogs - reading/writing, PWM, voltage dividers (dealing with a whole class of sensors)
- Using the Serial output for debugging
- Learning how to do lots of things without pausing (no delay()) - see blink without delay and learn that technique
- Learn about Finite State Machine style programming

Then it depends on what your interests are - find a project and put it all together into something useful.
5  Using Arduino / Displays / Re: Cant display 8 on my digit display when given the time interval!! on: April 18, 2014, 01:16:07 am
Quote
Please do tell me if there are any additional components I need to add to the circuit to ensure the safety of the digit display
I notice in the circuit that you do not have any resistors in series with the LED. You will end up damaging the LED or the Arduino output as the current drawn will be too high. You need to put a series R with the LED. I would suggest something like 470 Ohm to start with as a safe value. There are lots of resources to tell you how to calculated the R for your LED, it comes up often in these forums.

Also, rereading
Code:
off(0);off(1);off(2);off(3);off(4);off(5);off(6);off(7);off(8);off(9);
your outputs are  pins 0..7 and do not include 8 and 9.

Maybe your LEDs or the Arduino ports are shutting down. with a delay you would notice the 'flash'. Without the delay you are continuously turning them on again and again. If the delay is much shorter (say 20 ms) do they appear dim?


6  Using Arduino / Displays / Re: Cant display 8 on my digit display when given the time interval!! on: April 17, 2014, 03:13:36 pm
1. Not a good idea to use pins 0 and 1 as they are the serial comms pins. Start at 2.
2. The case statement can take any values, including 0 and negative.

Code:
void Dis(int b,int a=7)  // function to define the ports i need to be turned on to display various digits [0 to 9]
{
 off(a);
 b+=1;  // didnt know if 'case' could take values of 0 so i just incremented the digit to be displayed by 1.
 switch(b)
{

The only difference between an 8 and a 9 is one LED segment - could this be connected to output 7 which you are ALWAYS turning OFF in the code above (for no real reason that I can see)?

Also, post your code using the # not the quotation. It makes it easier to read.
7  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: April 14, 2014, 02:17:14 pm
All the pin numbers are defined in the Parola_Test example. You can change it to whatever you want if they don't suit.
Code:
// User interface pin and switch definitions
#define  SPEED_IN      A5 // control the speed with an external pot
#define  PAUSE_SET   4 // toggle pause time
#define  JUSTIFY_SET  6 // change the justification
#define  INTENSITY_SET 7 // change the intensity of the display
#define  EFFECT_SET    8 // change the effect
#define  INVERSE_SET   9 // set/reset the display to inverse

There is not much to explain about the circuit. Look at other examples on how to connect a pot and a switch to the Arduino. There is a lot already on this forum for these basic Arduino connections, so it is not really worth explaining it again here.
8  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: April 14, 2014, 06:42:03 am
I am not sure I understand your question. Do you mean the control you see in the video? It is just plain switches and a pot, like are used in most of the simple arduino examples.
9  Using Arduino / LEDs and Multiplexing / Re: Problem with 8x8 Matrix and Parola, nothing displaying... on: April 13, 2014, 02:04:38 pm
I don't think that you can just change the LED modules and expect it to work. The matrix itself is wired differently and the circuit from the MAX7219 chip has to take that into account. The software will then accommodate the different row/column orientation that may result.
10  Using Arduino / LEDs and Multiplexing / Re: Problem with 8x8 Matrix and Parola, nothing displaying... on: April 11, 2014, 06:51:18 pm
Generally common anode or common cathode doesn't make a difference to the libraries except that the module orientation will change. The new version of the libraries includes changes to make the adaptation for novel arrangements much easier.
11  Using Arduino / Sensors / Re: Problem with Color sensor module TCS3200 on: April 11, 2014, 06:21:50 pm
I have a library for the TCS230 which I think works in a similar way to the sensor you have. The library has some example code that allows it to 'recognize' colors which could be interesting for you. See the code repository link below to access the library if you are interested. If you do download, look for the PDF file that explains how to calibrate the sensor.
12  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: April 11, 2014, 06:14:55 pm
Quote
Can i expand this matrix vertically

You need to explain what you want to do. You can stack the displays on top of each other - that is just a physical layout.

If you want your software to operate as if it was a big screen, then you will need to handle the operations between the 'lines' of display. The ability to define zones has made this much easier - just define a zone for each line.
13  Using Arduino / Programming Questions / Re: Why == works in an if statement? on: April 06, 2014, 10:16:19 pm
Quote
Anyone know if > or <  are valid comparison operators or is >> and << used instead?

< and > are the correct comparison operators as are >=, <=, and != (not equal to).

<< and >> are used as bit shifting operators. (1 << 3) is the digit 1 shifted to the right 3 binary positions (ie, 00000001 becomes 00001000), or 2^3 = 8 decimal.

The questions you are asking are answered very clearly if you look up a C++ reference for 'operators'.
14  Using Arduino / LEDs and Multiplexing / Re: MAX7219 breakout board for 64 discrete LEDs on: April 05, 2014, 07:27:42 pm
What applications is this for?
15  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: April 05, 2014, 02:46:34 pm
That's good news that it works for you as well.

The source code download will always be the latest working copy as I develop a new release, before the official release. The zip file releases include updated documentation. This applies for Parola as well. You can look at the history of the source code to see my check-in comments as to what has changed.
Pages: [1] 2 3 ... 79