Loading...
  Show Posts
Pages: [1] 2
1  Using Arduino / Programming Questions / Re: Using Keypad.h with a matrix keypad on: March 06, 2013, 06:42:45 pm
Thanks guys.... I had a mind lapse...  these were great
suggestions and they worked....!!
 smiley-lol
2  Using Arduino / Programming Questions / Using Keypad.h with a matrix keypad on: March 06, 2013, 03:03:54 pm
Looking for suggestions... I want to promt the user to take an action (like select a menu item)
then select the option from a keypad.  I'm using the Keypad.h library with a 4x4 matrix keypad.
I send the prompt to the serial device Serial.print("Select desired menu item); I then want
to go into a loop and wait for a keypress i.e. char key = keypad.getKey();  I want the function
to be "blocking".  the Keypad.h function getKey() is non-blocking.  If I use something
like  keypad.waitForKey(); it returns a value of 0x00 when a key is pressed and if I follow
the waitForKey() function with a  key = keypad.getKey(); the value of key is null.

Anyone have a structure that will wait for a keypress (blocking) and return the key value
when a key is pressed???
3  Using Arduino / Programming Questions / Re: Saving Sketches on: February 24, 2013, 05:37:38 pm
Good question regarding where I was saving the file.  It was started in the libraries folder...  I moved it
from the libraries folder to a separate folder in the IDE environment and it saves without the
prompt.... smiley-red  problem solved.... thank you!!
4  Using Arduino / Programming Questions / Saving Sketches on: February 24, 2013, 05:10:47 pm
Why does the IDE prompt me to save my sketch with a different name everytime I make a change
to the sketch and click "save"?  It tells me, "some files are 'read-only' and to rename the sketch". 
The previously saved sketch is NOT flagged by the OS as 'read-only' -- this is very annoying to have
to rename the sketch whenever I modify/tweak it... ???

 smiley-confuse
5  Using Arduino / Displays / Re: Unknown LCD - Longshot on: January 25, 2013, 10:08:14 am
Thanks all... good pointers...   
 smiley-lol
6  Using Arduino / Displays / Re: Unknown LCD - Longshot on: January 25, 2013, 05:03:14 am
I've attached a picture with a few notations.  I've discovered that ALL of the terminals
marked as "-" are common as are the "+" terminals (although the appearance that
the "+" terminals may be common could be the result of some back circuits.....). 
I tend to aggree the first "+" terminal is probably a backlight and the "+" terminal
adjacent to the "TX" terminal is supply. The 8-pos switch probably sets the buaud rate
and other configurations but I've tried setting it to various random positions with no
observable change. 
7  Using Arduino / Displays / Unknown LCD - Longshot on: January 24, 2013, 09:57:37 pm
I found an unknown LCD in the local elec. surplus store and have been challenged to make it work.
It is a 2 x 16  display (5x7 block).  It has a serial interface (no manufacture ID although a Bing
search on an assy # on the board points to a url for "IndustrialElectricDirect" but the url registration
has expired.  There is an 8 pos screw terminal connector with the following lables:

 1   2   3    4   5    6   7   8
 + | - | - | RX | - | TX | + | -

There is a 7805 regulator on the board so I applied +9V to pins 7 and 8.  This causes a underbar
cursor to be displayed in pos 0 (row 1, col 1).  I've found that pins 3, 5 and 8 are all common grounds.
Pins 1 and 2 are isolated (pin 2 is not connected to pins 3, 5 or 8 ).  Pin 1 is not connected to
the +5V regulator output.   I've connected pin 4 (RX) to my Arduino UNO pin 1 (tx) and pump
an ascii letter 'A' to it and cycle thru baud rates from 1200 to 38400... but the cursor never moves nor
does the letter 'A' appear.   

Its a longshot that someone might recognize the LCD based on the 8-pin screw terminal connector
configuration..??
8  Using Arduino / Installation & Troubleshooting / Re: avrdude: stk500_getsync(): not in sync: resp=0x30 on: January 05, 2013, 07:53:11 pm
Add me to the ever growing list of "not in sync" errors.  I'm using an Arduino UNO R3 / ZUMO Shield combo.
Had been working for a couple of hours then all of a sudden I started getting the subject error.
It started as an intermittent failure and is now solid.  I've tried all the tips suggested in this post as
well as others in this forum.  None work.  I've even update Arduino 1.0.1 to 1.0.3 and updated the USB drivers,
all to no avail....   ?????
9  Using Arduino / Programming Questions / Sketch Filenames on: June 20, 2012, 07:03:08 am
When I create a new sketch and save it, I create a new folder then save the sketch in that folder.  If I make
any change to the sketch and "save as" to give it a new name (such as including a version # in the filename)
the IDE will not let me save the renamed sketch in the same folder.  It forces me to create a new folder.
Can this behavior be changed.  I would like to be able to save the sketch(s), the latest and prior versions,
in the same folder.
10  Using Arduino / Installation & Troubleshooting / Sketch READ-ONLY file save on: February 28, 2012, 06:06:41 am
Is it possible to configure the ARDUINO IDE such that while working
with sketches, they can be saved (overwriting the original file - perhaps
with a warning) rather than having to create a new folder/file
everytime you need to close the app to do other work or sleep.... ??
11  Development / Other Software Development / Re: Updated DS1307 simple library for arduino 1.0 and older on: February 25, 2012, 07:47:41 am
Hello,

I'm relatively new to the Arduino platform and am trying to use the DS1307 for
a timestamp source.  I've downloaded the DS1307.h library and have tried to run
some of the examples.  The sketches compile and load without error
but the output is not a valid date (for example the  DS1307_demo_en sketch
produces the following timestamp: "Actual time : 45:85:85 7 165/45/2165")

What pins should I be using for SDA and SDC on the Arduino UNO?

Thank you,
12  Development / Other Software Development / davidhbrown-RealTimeClockDS1307-ef34215 library on: February 24, 2012, 11:29:15 am
I've downloaded and installed the subject library. The sketch (RealTimeClockDS1307_Test)
complies and loads without error but when I run it and view the Serial Monitor I just get
a sequence hex chars that do not appear to be incrementing... the output on
the Serial Monitor looks like this:

Code:
1: FF-1F-3F 1F:7F:7FP
2: FF-1F-3F 1F:7F:7FP
3: FF-1F-3F 1F:7F:7FP
4: FF-1F-3F 1F:7F:7FP
5: FF-1F-3F 1F:7F:7FP
6: FF-1F-3F 1F:7F:7FP
7: FF-1F-3F 1F:7F:7FP
8: FF-1F-3F 1F:7F:7FP
9: FF-1F-3F 1F:7F:7FP
10: FF-1F-3F 1F:7F:7FP
11: FF-1F-3F 1F:7F:7FP
12: FF-1F-3F 1F:7F:7FP
13: FF-1F-3F 1F:7F:7FP
14: FF-1F-3F 1F:7F:7FP
15: FF-1F-3F 1F:7F:7FP
16: FF-1F-3F 1F:7F:7FP
17: FF-1F-3F 1F:7F:7FP
18: FF-1F-3F 1F:7F:7FP
19: FF-1F-3F 1F:7F:7FP
20: FF-1F-3F 1F:7F:7FP
21: FF-1F-3F 1F:7F:7FP
22: FF-1F-3F 1F:7F:7FP
23: FF-1F-3F 1F:7F:7FP
24: FF-1F-3F 1F:7F:7FP
25: FF-1F-3F 1F:7F:7FP
Send ? for a list of commands.
26: FF-1F-3F 1F:7F:7FP
27: FF-1F-3F 1F:7F:7FP
28: FF-1F-3F 1F:7F:7FP

Looking at the DS1307 datasheet the default/power on  date/time should be  01/01/00 00:00:00 but I can't
get to this from FF-1F-3F 1F:7F:7FP ??
13  Using Arduino / Programming Questions / Re: char msg[] versus const char text[] on: February 23, 2012, 05:30:00 am
SOLVED!  Thank you.  Those nasty pointers... one area of C I always tried to avoid.
Thank you all..
14  Using Arduino / Programming Questions / Re: char msg[] versus const char text[] on: February 22, 2012, 09:02:19 pm
Your right on Paul.... although while it does compile witout complaing...
the result is not as expected.  What I would expect to see is "TUNE"
on the Matrix, instead it seems to be a series of random chars... ??

Code:
    //message 1
    HT1632.clear();
    HT1632.render();
    xstart = 4;
    char msg[] = {"TUNE  "};
    for(int z = 0, x = xstart; z < 6; z++, x+=6)
    {
      HT1632.drawText((const char *)msg[z], x, y, FONT_5X7, FONT_5X7_WIDTH, FONT_5X7_HEIGHT, FONT_5X7_STEP_GLYPH);
    }
    HT1632.render();
    delay(1000);
15  Using Arduino / Programming Questions / char msg[] versus const char text[] on: February 22, 2012, 05:53:53 am
I'm using an app that displays messages on a SURE 3208 8x8 Led Matrix.  It uses
the HT1632.h library routines.  One of the routines (HT1632.drawText) will
display a single character passed to it as a const char.  The specific parameter
is "const char text[]".

I would like to be able to take a string like char msg[] = {"message"}; and
iterate thru the string passing a single char to the HT1632.drawText function.

When I call the function with msg
  • as the const char text[] paramerter, the
compiler complains that I can't convert char to const char.  I've been unable
to find the right code that would allow me to iterate thru each char in
msg[] and pass this char to the HT1632.drawText function.  

Anyone have an ideas how this might be done?   Following is a code snipette..
I would like to be able to write a function that takes a char msg[] string
and breaks it down into single char that can be passed to the HT1632.drawText
function...
  
Code:
void loop()
  {
    char msg1[7] =  {'T','U','N','E',' ',' '};
    char msg2[7] =  {'F','M',' ',' ',' ',' '};
    char msg3[7] =  {'1','0','7','.','3',' '};
    int  xstart;
    int  y = 1;
 
    //message 1
    HT1632.clear();
    HT1632.render();
    xstart = 4;
    for(int z = 0, x = xstart; z < 6; z++, x+=6)
    {
      char val[1] = {msg1[z]};
      HT1632.drawText(val, x, y, FONT_5X7, FONT_5X7_W, FONT_5X7_H, FONT_5X7_STEP);
    }
    HT1632.render();
    delay(1000);
  }

Moderator: CODE TAGS
Pages: [1] 2