Show Posts
Pages: [1] 2 3
1  Using Arduino / Displays / Re: Noritake DS2045G VFD Display question on: October 29, 2012, 03:37:27 pm
I've been studying both versions but I don't know how to do it. I was hoping someone else had worked with these displays and had a file that worked. The display is nice since it has no PC board on the back. All the circuitry is inside the glass so it fits in various projects much easier.
2  Using Arduino / Displays / Noritake DS2045G VFD Display question on: October 29, 2012, 04:22:39 am
I recently acquired a Noritake DS2045G. I have it powered up and interfaced to my Mega 2560. My question is in regard to the library for it. The noritake site indicates the CU-U library is the proper one for it.
library link: http://www.noritake-elec.com/codeLibrary.php#cuu
link to device web page: http://www.noritake-elec.com/ds2045g.php
I have been using the Adafruit VFD library and it does work but is not 100% correct. The display will flash on and off every few seconds and will display odd characters at times.



The Noritake library file is apparently written for AVR Studio and I'm not familiar with that. Is there a way to use the library with the Arduino directly?
3  Development / Other Hardware Development / Re: Eagle CAD can't route MAX3221 SSOP chip on: October 08, 2012, 02:57:00 pm
I got it. I had to change the routing grid from 50 to 10.
4  Development / Other Hardware Development / Re: Eagle CAD can't route MAX3221 SSOP chip on: October 08, 2012, 01:24:56 pm
S-232 Transceivers with AutoShutdown
1µA Supply-Current, True +3V to +5.5V
http://dbserv.maxim-ic.com/

Package: SSOP16
Shrink Small Outline Package
package type SS

https://dl.dropbox.com/u/5509596/maxim.lbr
5  Development / Other Hardware Development / Eagle CAD can't route MAX3221 SSOP chip on: October 08, 2012, 11:22:12 am
I'm having a heck of a time using a MAX3221 with my design. Eagle refuses to route anything to it. I assume it's a signal path size issue and Eagle thinks the connections will be too large for the pins but changing various design rules doesn't seem to help me.

I'm hoping someone has some suggestions.

Thanks
6  Using Arduino / Programming Questions / Re: Using keypad.h HOLD to fire off continuous data? on: July 27, 2012, 06:49:08 pm
I know, and it's appreciated.

I have a bad habit of getting to where I think something will work then I get frustrated and I delete it and start over to head in a different direction so I am not wading around the mess I just created. Plus, I hesitate to post something horrid because I feel like the dummy in the class while everyone is thinking, "man what a moron".  smiley-confuse But, I do realize you can't help if you can't see it so I will stop doing that.


Quote
I will figure it out eventually.
OK, but, we're here to help.
7  Using Arduino / Programming Questions / Re: Using keypad.h HOLD to fire off continuous data? on: July 27, 2012, 06:18:57 pm
Yes, bad terminology.

I would like to serially print two different strings of data. One string would be sent upon a keypad "button" press, the other on the following subsequent press of the same button and vice versa.

A software version of a flip flop is what I'm thinking of. A hardware interface example would be pressing # to initiate a solenoid to hold open a door lock, whereas the next press of the same # would release the solenoid engaging a lock when the said door has been closed.

I'm working with the generic keypad code. I tried several combinations of boolean states but became frustrated and wiped the slate so I am back to the plain keypad code with a single action assigned to each case.

I will post a better question after working with it again later on.

Apologies for wasting everyone's time.

I will figure it out eventually.

8  Using Arduino / Programming Questions / Re: Using keypad.h HOLD to fire off continuous data? on: July 27, 2012, 06:04:36 pm
Anyone have any ideas on a flip flop type toggle function that could be used with the keyapad? I would like a button to initiate an action when pressed and then initiate a different one when pressed again, back and forth similarly to a digital I/O pin with Hi/Lo status. I tried working with some boolean flags but am not hitting on the right combination of what to use.
9  Using Arduino / Programming Questions / Re: Using keypad.h HOLD to fire off continuous data? on: July 25, 2012, 09:46:54 pm
It works great now. Thank you!



You should only call getKey() once within the loop.  You can call it in other places but it's possible that you could end up with a new state or an un-pressed key by the second call to getKey().

Once you've called "aKey = kpd.getKey()" and assigned it to holdKey then you simply see if holdKey is one of the arrow(?) keys and then test for HOLD.

Or the other way around.  If you only care about the arrow keys being held down (meaning you'll ignore any other keys being held) then once you are inside the HOLD event you can test holdKey to see which arrow key is being held.

That's what I've done in this sketch.

Code:
#include <Keypad.h>

const byte ROWS = 4; //four rows
const byte COLS = 3; //three columns
char keys[ROWS][COLS] = {
  {'<','^','>'},
  {'4','5','6'},
  {'7','8','9'},
  {'*','0','#'}
};
byte rowPins[ROWS] = {5, 4, 3, 2}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {8, 7, 6}; //connect to the column pinouts of the keypad

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

char holdKey;
unsigned long t_hold;

void setup(){
  Serial.begin(9600);
}
 
void loop(){
  char key = keypad.getKey();
 
   if (key){
     holdKey = key;
     Serial.println(key);
   }
 
   if (keypad.getState() == HOLD) {
      if ((millis() - t_hold) > 100 ) {
          switch (holdKey) {
              case '<':
                  Serial.println("Move Left");
                  break;
              case '^':
                  Serial.println("Move Up");
                  break;
              case '>':
                  Serial.println("Move Right");
          }
          t_hold = millis();
      }
   }
}
10  Using Arduino / Displays / Would a Garmin NUVI LCD / Touch Panel be of any use? on: July 24, 2012, 07:03:14 pm
I was looking at my NUVI the other day and couldn't help but thing how perfect the display and touch sensor would be for a multitude of projects. Has anyone ever used one with the Arduino? Is it even compatible at all?
11  Using Arduino / Programming Questions / Re: Using keypad.h HOLD to fire off continuous data? on: July 14, 2012, 01:19:16 am
Wow that's interesting.

Thanks for the info, and thanks to all others that replied too. I will try the various ideas and try to get this going.
12  Using Arduino / Programming Questions / Re: Using keypad.h HOLD to fire off continuous data? on: July 13, 2012, 02:29:07 pm
That's what I'm trying to do but I am not doing something correctly. I'm getting confused as to how to use it in conjunction with the HOLD test.

I'm getting lost in the logic.
13  Using Arduino / Programming Questions / Re: Using keypad.h HOLD to fire off continuous data? on: July 13, 2012, 02:08:22 pm
My confusion is how would I discriminate between which button is pressed using
 if (kpd.getState() == HOLD) {
      if ((millis() - t_hold) > 100 ) {
          Serial.println(holdKey);
          t_hold = millis();

I can place a bit of code within the statement and it will repeat when any key is held but I would like the code corresponding to each key to repeat when each individual key is held. That has be stumped at this point.
14  Using Arduino / Programming Questions / Re: Using keypad.h HOLD to fire off continuous data? on: July 11, 2012, 09:17:20 pm
I meant to post the code but was at work and didn't have access to the pc it was on.

This is the keypad code I've been using so far. It works well enough but as you can see there is no press and hold function. I'm really only interested in the last four case statements ( arrow up and down and the volume up and down) having the ability to repeat at about a 100 ms rate. I hope it makes sense in this code snippet but with the volume I'm basically just incrementing or deincrementing the volume byte in the array and adding the checksum base. I would like the ability to press and hold and after about a half second it takes off and ramps the volume up and down while held.


Code:
// Keypad actions
  {
    char key = keypad.getKey();
    {
      if(key)  // Check for a valid key.
      {
        switch (key)
        {
        case '1':
          Serial.write(button1, 10);
          Serial.write(buttonRelease, 10);
          break;    

        case '2':
          Serial.write(button2, 10);
          Serial.write(buttonRelease, 10);
          break;

        case '3':

          Serial.write(button3, 10);
          Serial.write(buttonRelease, 10);
          break;


       //-----  various case statements removed to shorten code for forum display




        case 'arrowUP':
          Serial.write(arrowUp, 10);
          Serial.write(txACK,sizeof(txACK));
          Serial.write(buttonRelease, 10);  
          break;

        case 'arrowDown':
          Serial.write(arrowDown, 10);
           Serial.write(txACK,sizeof(txACK));
          Serial.write(buttonRelease, 10);
          break;

        case 'volUp':
          volume[4] = volumeVar;
          volume[6] = volumeVar + 0x6A;
          volumeVar = volumeVar + 0x01;
          Serial.write(volume, 8);
          break;

        case 'volD':
          volume[4] = volumeVar;
          volume[6] = volumeVar + 0x6A;
          volumeVar = volumeVar - 0x01;
          Serial.write(volume, 8);
          break;

        
          }

          break;

        }
      }
    }
15  Using Arduino / Programming Questions / Using keypad.h HOLD to fire off continuous data? on: July 11, 2012, 06:39:26 pm
I tried searching but didn't find a specific answer.

Can someone lend some guidance on the most feasible way to initiate a continuous output while HOLDING a keypad button? I worked with the examples in the IDE last night and I see that when a button is pressed and held past the hold timer it will initiate a single instance of whatever is contained in the HOLD statement. I would like to initiate a continuous output while the button his held down similar to how your computer keyboard functions.

 

Pages: [1] 2 3