Show Posts
Pages: 1 ... 42 43 [44] 45 46 ... 197
646  Using Arduino / Project Guidance / Re: Max simultaneous key presses for Keyboard library on: December 31, 2013, 05:41:26 am
First, you will need to get an Arduino Leonardo as it can act as a functional keyboard. Second, I don't know how many simultaneous key presses it can record, in fact I don't think it even sends out simultaneous key presses at all. From what I read, it sends the key presses one key at a time, so it's possible it can send any amount of key presses. However I don't have an Arduino Leonardo myself , so I can't do any tests to confirm this. Maybe another member can do a test and share the results.
647  Using Arduino / Project Guidance / Re: Max simultaneous key presses for Keyboard library on: December 31, 2013, 05:13:37 am
Instead of using the keyboard library, why not just adapt the SNES controller library? It reads each button as a bit and stores it into two bytes. This allows all the buttons to be pressed, but I'm not sure if it can distinguish multiple controllers. That you may need to look into.
648  Using Arduino / Project Guidance / Re: RS485 Phantom Power on: December 31, 2013, 05:07:49 am
Well you could have two of the wires be power lines, and the other one be a data line. The only issue with this method is the clock. All the clocks will need to be in sync otherwise you will get wrong data. However, if you can  maybe change the cable from a XLR to maybe a 3 Channel 1/8 or 1/4 inch audio jack, this way you can have the two power lines and a data + clock lines. If that is not an option then look at this site. Lowes_cables
649  Using Arduino / Project Guidance / Re: RGB Led cube on: December 31, 2013, 04:56:40 am
You may want to get 4 of these 74HC595 it's a shift register that work great when using RGB LEDs. I don't have any sample codes at the moment, but I'm sure the Arduino playground has some you can play around with. If not, just do a quick search in the forum. Many have done the same project as you, so there should be more than enough material to work with.
650  Using Arduino / Project Guidance / Re: lcd not declared on: December 31, 2013, 04:50:07 am
A link to your lcd will help. Have you tried looking up your lcd on say digikey, mouser or eBay? If you can find it, you may also find a link to a working library.
651  Using Arduino / Project Guidance / Re: Hey, need some help on where to start programming! (Balancing Bot) on: December 30, 2013, 11:21:24 pm
What is your serial monitors baud rate?
652  Using Arduino / Programming Questions / Re: Led Desk 2.0 Help! on: December 30, 2013, 09:57:25 pm
That's because you are inputting one too many elements. Look at the  sketch I provided and find the one I put in Bold. Does it look like yours. Also if you want, take a look at the .h file and see all the possible elements you can have in that function.
653  Using Arduino / Programming Questions / Re: Touchscreen TFT 2.8, need help on: December 30, 2013, 01:59:43 pm
Just because it compiles, does not mean it works for your display. Also did you try all the different models?

Quote
HX8347A   LITERAL1
HX8352A   LITERAL1
HX8352A   LITERAL1
ILI9320_8   LITERAL1
ILI9320_16   LITERAL1
ILI9325C   LITERAL1
ILI9325D_8   LITERAL1
ILI9325D_16   LITERAL1
ILI9325D_16ALT   LITERAL1
ILI9327   LITERAL1
ILI9481   LITERAL1
PCF8833   LITERAL1
S1D19122   LITERAL1
S6D0164   LITERAL1
S6D1121_8   LITERAL1
S6D1121_16   LITERAL1
SSD1289   LITERAL1
SSD1289_8   LITERAL1
SSD1289LATCHED   LITERAL1
SSD1963_480   LITERAL1
SSD1963_800   LITERAL1
SSD1963_800ALT   LITERAL1

This is from the keywords file in UTFT, these are all the "compatible" display models. You can go try your luck and go through each model and see if one works.
654  Using Arduino / Project Guidance / Re: Please help me with the code to control a motor using arduino mega and megamoto on: December 30, 2013, 02:57:03 am
Your welcome. I took another look at the link to the manual I gave and if you look on pages 4 & 5, it tells you all about the current sensor and how to use it. Figures 3 and 4 show you the jumper configurations.

Now the only thing I don't know nor did I read anything in the manual, is if you need a certain formula to calculate the current.
Being that no such formula was provided, leads me to think the output from the pin will be in milliamps already.

So the highest value the analog pin can read is 1023, so this would mean that the highest reading you can get is 1.023 Amps or 1023 milliamps. Give it a try, I'm sure you know how to read an analog pin, right?
655  Using Arduino / Project Guidance / Re: LED Lightup based on Twitter #hashtag on: December 29, 2013, 04:27:46 pm
Web based projects are not my strong suit, but I did find this that may help you. Tweetosapien
656  Using Arduino / Programming Questions / Re: Touchscreen TFT 2.8, need help on: December 29, 2013, 02:19:06 pm
Quote
So what I do is put the file UTFT.h in the folder UTouch.


You put the UTFT folder into the UTouch folder? Why? They are separate libraries, so they should be in separate folders.

Those libraries come with demo codes that show you what they can do, did you try them?
657  Using Arduino / Programming Questions / Re: Led Desk 2.0 Help! on: December 28, 2013, 10:59:41 pm
No, that doesn't make any sense.
Why would he need to move it to another line? If he did that, then why define it at all?

He needs to look at an example sketch to show him how to write the code the correct way. Or he could get rid of the #define.

Actually here is the example sketch.
Code:
#include "SPI.h"
#include "Adafruit_WS2801.h"

/*****************************************************************************
Example sketch for driving Adafruit WS2801 pixels!


  Designed specifically to work with the Adafruit RGB Pixels!
  12mm Bullet shape ----> https://www.adafruit.com/products/322
  12mm Flat shape   ----> https://www.adafruit.com/products/738
  36mm Square shape ----> https://www.adafruit.com/products/683

  These pixels use SPI to transmit the color data, and have built in
  high speed PWM drivers for 24 bit color per pixel
  2 pins are required to interface

  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.  
  BSD license, all text above must be included in any redistribution

*****************************************************************************/

// Choose which 2 pins you will use for output.
// Can be any valid output pins.
// The colors of the wires may be totally different so
// BE SURE TO CHECK YOUR PIXELS TO SEE WHICH WIRES TO USE!
uint8_t dataPin  = 2;    // Yellow wire on Adafruit Pixels
uint8_t clockPin = 3;    // Green wire on Adafruit Pixels

// Don't forget to connect the ground wire to Arduino ground,
// and the +5V wire to a +5V supply

// Set the first variable to the NUMBER of pixels. 25 = 25 pixels in a row
Adafruit_WS2801 strip = Adafruit_WS2801(25, dataPin, clockPin);

// Optional: leave off pin numbers to use hardware SPI
// (pinout is then specific to each board and can't be changed)
//Adafruit_WS2801 strip = Adafruit_WS2801(25);

// For 36mm LED pixels: these pixels internally represent color in a
// different format.  Either of the above constructors can accept an
// optional extra parameter: WS2801_RGB is 'conventional' RGB order
// WS2801_GRB is the GRB order required by the 36mm pixels.  Other
// than this parameter, your code does not need to do anything different;
// the library will handle the format change.  Examples:
//Adafruit_WS2801 strip = Adafruit_WS2801(25, dataPin, clockPin, WS2801_GRB);
//Adafruit_WS2801 strip = Adafruit_WS2801(25, WS2801_GRB);

void setup() {
    
  strip.begin();

  // Update LED contents, to start they are all 'off'
  strip.show();
}


void loop() {
  // Some example procedures showing how to display to the pixels
  
  colorWipe(Color(255, 0, 0), 50);
  colorWipe(Color(0, 255, 0), 50);
  colorWipe(Color(0, 0, 255), 50);
  rainbow(20);
  rainbowCycle(20);
}

void rainbow(uint8_t wait) {
  int i, j;
  
  for (j=0; j < 256; j++) {     // 3 cycles of all 256 colors in the wheel
    for (i=0; i < strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel( (i + j) % 255));
    }  
    strip.show();   // write all the pixels out
    delay(wait);
  }
}

// Slightly different, this one makes the rainbow wheel equally distributed
// along the chain
void rainbowCycle(uint8_t wait) {
  int i, j;
  
  for (j=0; j < 256 * 5; j++) {     // 5 cycles of all 25 colors in the wheel
    for (i=0; i < strip.numPixels(); i++) {
      // tricky math! we use each pixel as a fraction of the full 96-color wheel
      // (thats the i / strip.numPixels() part)
      // Then add in j which makes the colors go around per pixel
      // the % 96 is to make the wheel cycle around
      strip.setPixelColor(i, Wheel( ((i * 256 / strip.numPixels()) + j) % 256) );
    }  
    strip.show();   // write all the pixels out
    delay(wait);
  }
}

// fill the dots one after the other with said color
// good for testing purposes
void colorWipe(uint32_t c, uint8_t wait) {
  int i;
  
  for (i=0; i < strip.numPixels(); i++) {
      strip.setPixelColor(i, c);
      strip.show();
      delay(wait);
  }
}

/* Helper functions */

// Create a 24 bit color value from R,G,B
uint32_t Color(byte r, byte g, byte b)
{
  uint32_t c;
  c = r;
  c <<= 8;
  c |= g;
  c <<= 8;
  c |= b;
  return c;
}

//Input a value 0 to 255 to get a color value.
//The colours are a transition r - g -b - back to r
uint32_t Wheel(byte WheelPos)
{
  if (WheelPos < 85) {
   return Color(WheelPos * 3, 255 - WheelPos * 3, 0);
  } else if (WheelPos < 170) {
   WheelPos -= 85;
   return Color(255 - WheelPos * 3, 0, WheelPos * 3);
  } else {
   WheelPos -= 170;
   return Color(0, WheelPos * 3, 255 - WheelPos * 3);
  }
}

Quote
// Don't forget to connect the ground wire to Arduino ground,
// and the +5V wire to a +5V supply

// Set the first variable to the NUMBER of pixels. 25 = 25 pixels in a row
Adafruit_WS2801 strip = Adafruit_WS2801(25, dataPin, clockPin);

// Optional: leave off pin numbers to use hardware SPI
// (pinout is then specific to each board and can't be changed)
//Adafruit_WS2801 strip = Adafruit_WS2801(25);
658  Using Arduino / Programming Questions / Re: Led Desk 2.0 Help! on: December 28, 2013, 10:20:11 pm
Here is your problem.
Quote
#define Adafruit_WS2801 strip = Adafruit_WS2801(STRIPLEN, dataPin, clockPin, WS2801_GRB);
Your defining Adafruit_WS2801 with strip = Adafruit_WS2801(STRIPLEN, dataPin, clockPin, WS2801_GRB); but nowhere else do you use Adafruit_WS2801. Also what are dataPin and clockPin set to?

What might help is remove #define and just leave the rest as is, and also tell it what dataPin and clockPin are.
659  Using Arduino / Programming Questions / Re: Led Desk 2.0 Help! on: December 28, 2013, 06:06:29 pm
Where did you initialize strip, what / where is it located? Is it part of a library, if so which one? The reason you are getting that message is because it is the first occurrence of strip.numPixels(). If your code does not know what strip is, then the compiler will assume it is a string, until proved otherwise.
660  Using Arduino / Programming Questions / Re: Touchscreen TFT 2.8, need help on: December 28, 2013, 01:46:50 pm
Adafruit_GFX: Shapes
TFTLCD Touchscreen library
@Lar3ry  henning's library doesn't work for all TFT screens, so the OP should use the one recommend by Adafruit.
Pages: 1 ... 42 43 [44] 45 46 ... 197