Show Posts
Pages: [1] 2 3 ... 5
1  General Category / General Discussion / Re: Maker Faire Robot Kit [help] on: July 21, 2013, 03:18:55 am
The pinout helps a little bit. I know it was designed with those connectors in mind but if I buy an Arduino board I don't need Arduino sensors. Any sensor I want will work with the Arduino. Just sucks this almost $300 robot doesn't have more documentation.

Thanks.
2  General Category / General Discussion / Maker Faire Robot Kit [help] on: July 11, 2013, 06:47:03 pm
I recently bought the Arduino Robot kit while at Maker Faire in Kansas City.

I'm starting to regret it...

When I first bought the robot the batteries that come with it were dead and despite leaving the robot plugged in overnight they were still dead the next day. I found a local battery store in KC and bought some new batteries and a charger ($50!). Excited, I rushed back to where I was staying for the weekend. I've used Arduino for a long time now and figured I could have a "Hello World!" type program up and running in minutes. It's been awhile now and all I've gotten it to do is beep and show pictures on the LCD screen. So instead of the almost $300 robot I bought I now have a tiny $300 picture viewer.

I have found the Arduino.cc website for the robot (http://arduino.cc/en/Main/Robot) and its library (http://arduino.cc/en/Reference/RobotLibrary) but it hasn't helped.

There are three-pin connectors that are placed all around the robot that I thought I could use for the parallax ping sensors and after figuring out the schematic (there is no information on what is power, what is ground, and what is the signal line), the sensor won't even turn on.

I plugged the sensor into an Arduino and it works fine. I even hooked up a potentiometer to the robot to make sure I had the lines correct and the analog read displays the correct information. I had a parallax motion sensor laying around and hooked it up. It works fine. I took a volt meter and it is putting out 5 volts.

Does anyone have ANY kind of information on these robots? Voltages, pinouts, how it works, tutorials for getting things to work (like the ping sensor), etc, etc???

Thanks for any and all help. I'll be holding my robot looking at the pictures on the LCD.
3  Using Arduino / LEDs and Multiplexing / Re: RGB LED Strip *help* on: January 01, 2013, 06:29:33 am
If you want a good set of LEDs get this strip from Adafruit.

http://adafruit.com/products/306

It's the one I'm using for my main project now that I know the RadioShack ones won't work.
4  Using Arduino / LEDs and Multiplexing / Re: RGB LED Strip *help* on: December 31, 2012, 02:29:37 pm
EchelonForce that explains a lot about the prints... sometimes it would work with them and sometimes only half the strip would light up.

Neither of which were the color(s) expected, though. You don't have to go out and buy one of these I was just trying to play around with it. Like I said on G+ I also have the Adafruit LED strip and it's much better (and more documented) that I'm going to use for a "main" project.

These ones from RadioShack turn on and off (that's about it lol) and will work for a side project I'm going to give to a friend for her kids as a night like of some kind.
5  Using Arduino / LEDs and Multiplexing / Re: RGB LED Strip *help* on: December 31, 2012, 02:21:35 pm
Did you ever get it going?

I am a complete newbie to all the code. I have a basic electronics background and decided to learn about the Arduino and start on some basic projects.
I bought the LED Strip from Radio Shack just last night. Today, I hooked up the board and strip according to the guide with 12V AA battery pack into the DC barrel socket, Black to GND, Red to Vin, and the Green to A0. I used their sketch from the website, uploaded it and nothing. Rinse, repeat, and still nothing. Then I noticed a brownish black smudge on the first chip under the clear protector. I thought maybe the chip fried so I cut off the first LED segment (as designed) and soldered the leads onto the next contact pads, re sent the code, and no lights. Granted the segments are still together, except the first one. Not sure if this matters?
I think the Aduino works, I ran some successful projects recently and the TX and RX light flicker when loaded. Oddly, when I remove the GND the first  3 LEDs/circuit lights up very dimly.
Any help would be appreciated. A simple sketch just to make sure the lights and strip work would be a good start.
Thanks


Is your DC barrel maybe backwards? I think the Arduino must be center tip negative (plug it in minus the usb cable... if it doesn't come on it's probably backwards) just flip your positive / negative wires. Green -> A0 (analog zero) red to VIN and black to GND the sketch from RadioShack should at least light them up. The brown on one of the chips might suggest it got fried (and if so probably your whole strip is fried)

As far as the code working how I'd like... no. It's not there yet but I've gotten help from a lot of very helpful people.

If you want to try again and get another strip I suggest http://adafruit.com/products/306 from Adafruit. I have both strips (just to play around with) and the Adafruit ones are way better. Code is better, too. They're both around the same price.
6  Using Arduino / LEDs and Multiplexing / Re: RGB LED Strip *help* on: December 30, 2012, 10:10:14 pm
Code:
#include <avr/pgmspace.h>

#define DATA_1 (PORTC |=  0X01)    // DATA 1    // for UNO
#define DATA_0 (PORTC &=  0XFE)    // DATA 0    // for UNO
#define STRIP_PINOUT (DDRC=0xFF)    // for UNO

unsigned long color;

void setup() {               
  reset_strip();
  Serial.begin(9600);
}

void loop(){
  send_1M_pattern(createStripColor(16, 16, 255), 1, 250);
  delay(500);
}

unsigned long createStripColor(unsigned char r, unsigned char g, unsigned char b) {
  color = color | ((unsigned long)g << 16);
  color = color | ((unsigned long)b << 8);
  color = color | r;
  Serial.print("R: ");
  Serial.println(r);
  Serial.print("G: ");
  Serial.println(g);
  Serial.print("B: ");
  Serial.println(b);
  Serial.print("Color: ");
  Serial.println(color, HEX);
  return color;
}

void send_1M_pattern(byte data, int pattern_no, int frame_rate)
{
  int i=0;
  int j=0;
  uint32_t temp_data;
  for (i=0;i<pattern_no;i++)
  {
    noInterrupts();
    for (j=0;j<10;j++)
    {
      temp_data=pgm_read_dword_near(&data);
      send_strip(temp_data);
    }
    interrupts();

    delay(frame_rate);
  }
}

void send_strip(uint32_t data)
{
  int i;
  unsigned long j=0x800000;
  for (i=0;i<24;i++)
  {
    if (data & j)
    {
      DATA_1;
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");   
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      DATA_0;
    }
    else
    {
      DATA_1;
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");   
      DATA_0;
    }

    j>>=1;
  }
}

void reset_strip()
{
  DATA_0;
  delayMicroseconds(20);
}
7  Using Arduino / LEDs and Multiplexing / Re: RGB LED Strip *help* on: December 30, 2012, 08:19:45 pm
Code:
#include <avr/pgmspace.h>
#define DATA_1 (PORTC |=  0X01)    // DATA 1    // for UNO
#define DATA_0 (PORTC &=  0XFE)    // DATA 0    // for UNO
#define STRIP_PINOUT (DDRC=0xFF)    // for UNO

byte color;

void setup() {               
  STRIP_PINOUT;        // set output pin - DEBUG: should auto detect which mother board for use
  reset_strip();
  Serial.begin(9600);
}

void loop(){
  createStripColor(1, 255, 1);
  send_1M_pattern(color, 1, 70);
  Serial.println(color);
}

unsigned long createStripColor(byte r, byte g, byte b) {
byte color=0x00;
color = color | ((unsigned long)r << 16);
color = color | ((unsigned long)b << 8);
color = color | g;
return color;
}

void send_1M_pattern(const unsigned long data, int pattern_no, int frame_rate)
{
  int i=0;
  int j=0;
  uint32_t temp_data;
  for (i=0;i<pattern_no;i++)
  {
    noInterrupts();
    for (j=0;j<10;j++)
    {
      temp_data=pgm_read_dword_near(&data);
      send_strip(temp_data);
    }
    interrupts();
    delay(frame_rate);
  }
}

void send_strip(uint32_t data)
{
  int i;
  unsigned long j=0x800000;
  for (i=0;i<24;i++)
  {
    if (data & j)
    {
      DATA_1;
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");   
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      DATA_0;
    }
    else
    {
      DATA_1;
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");   
      DATA_0;
    }

    j>>=1;
  }
}

void reset_strip()
{
  DATA_0;
  delayMicroseconds(20);
}

This is what I've got so far. The LED strip lights up but only with the "Serial.println(color);"  without that the colors aren't displayed or they're displayed weird.

Is this right? I googled unsigned long online and it said to use byte.
Code:
byte color=0x00;
color = color | ((unsigned long)r << 16);
color = color | ((unsigned long)b << 8);
color = color | g;

Not sure what's wrong or where to begin to fix it.
8  Using Arduino / LEDs and Multiplexing / Re: Tricolor LED Strip on: December 29, 2012, 01:38:43 am
I have the same LED strip. Have you gotten anything else figured out?
9  Using Arduino / LEDs and Multiplexing / RGB LED Strip *help* on: December 29, 2012, 01:19:44 am
The other day I was in RadioShack and bought this:

http://www.radioshack.com/product/index.jsp?productId=16306856

The source code provided isn't much help. Here it is:
Code:
#include <avr/pgmspace.h>

#define DATA_1 (PORTC |=  0X01)    // DATA 1    // for UNO
#define DATA_0 (PORTC &=  0XFE)    // DATA 0    // for UNO
#define STRIP_PINOUT (DDRC=0xFF)    // for UNO

PROGMEM const unsigned long pattern_test_red[10][10]={
  {0xff0000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
  {0x000000,0xff0000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
  {0x000000,0x000000,0xff0000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
  {0x000000,0x000000,0x000000,0xff0000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
  {0x000000,0x000000,0x000000,0x000000,0xff0000,0x000000,0x000000,0x000000,0x000000,0x000000},
  {0x000000,0x000000,0x000000,0x000000,0x000000,0xff0000,0x000000,0x000000,0x000000,0x000000},
  {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xff0000,0x000000,0x000000,0x000000},
  {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xff0000,0x000000,0x000000},
  {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xff0000,0x000000},
  {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xff0000},
};
//there are more patterns but i deleted them to save space
};
void setup() {               
  STRIP_PINOUT;        // set output pin - DEBUG: should auto detect which mother board for use
  reset_strip();
}
void loop()
{
  send_1M_pattern(pattern_test_red, 10, 500);
  delay(500);
  send_1M_pattern(pattern_test_blue, 10, 500);
  delay(500);
  send_1M_pattern(pattern_test_green, 10, 500);
  delay(500);
  send_1M_pattern(pattern_test_white, 10, 500);
  delay(500);
  send_1M_pattern(pattern_test_comet1, 10, 70);
  delay(500);
  send_1M_pattern(pattern_test_comet2, 10, 70);
  delay(500);
  send_1M_pattern(pattern_test_comet3, 10, 70);
  delay(500);
  while (1)
  {
    send_1M_pattern(pattern_test_rainbow, 10, 70);
  }
}
void send_1M_pattern(const unsigned long data[][10], int pattern_no, int frame_rate)
{
  int i=0;
  int j=0;
  uint32_t temp_data;
  for (i=0;i<pattern_no;i++)
  {
    noInterrupts();
    for (j=0;j<10;j++)
    {
      temp_data=pgm_read_dword_near(&data[i][j]);
      send_strip(temp_data);
    }
    interrupts();
    delay(frame_rate);
  }
}
void send_strip(uint32_t data)
{
  int i;
  unsigned long j=0x800000;
  for (i=0;i<24;i++)
  {
    if (data & j)
    {
      DATA_1;
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");   
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      DATA_0;
    }
    else
    {
      DATA_1;
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");
      __asm__("nop\n\t");   
      DATA_0;
    }
    j>>=1;
  }
}
void reset_strip()
{
  DATA_0;
  delayMicroseconds(20);
}

Someone in the comments had wrote this:
Code:
unsigned long createStripColor(unsigned char r, unsigned char g, unsigned char b) {
unsigned long color = 0x00;
color = color | ((unsigned long)g << 16);
color = color | ((unsigned long)b << 8);
color = color | r;
return color;
}

I've tried
Code:
void loop(){
createStripColor(255,0,0)
}
unsigned long createStripColor(unsigned char r, unsigned char g, unsigned char b) {
unsigned long color = 0x00;
color = color | ((unsigned long)g << 16);
color = color | ((unsigned long)b << 8);
color = color | r;
return color;
}
But the LEDs don't do anything. I'd like to just send the 0 - 256 values that I understand. Once I get that figured out I'll be golden. Or at least a way to turn the 0 - 256 into 0x00 format.

0xff0000 = bright green 0x110000 = light green 0x00ff00 = bright blue 0x001100 = light blue 0x0000ff = bright red and 0x000011 = light red
10  Using Arduino / Project Guidance / Re: Moving in and out of a do while loop? on: December 24, 2012, 10:57:06 pm
Here's the code so far. Just need to make some awesome patterns now. Thanks again for your help.

It listens for an IR code, does the pattern, and then listens again. There is a bit of a "delay" but it's not bad. The "delay" is due to it not reading IR signals while it does the pattern. Once the pattern is done though, it will automatically go to what button you pressed next.

I'll make a video tomorrow just to show it working.

11  Using Arduino / Project Guidance / Re: Moving in and out of a do while loop? on: December 24, 2012, 12:26:31 pm
Wow that makes sense now. Thanks a lot for your help.
12  Using Arduino / Project Guidance / Re: Moving in and out of a do while loop? on: December 24, 2012, 08:48:47 am

So, yes, you could use a while loop to execute functions over and over, exiting when a new IR event occurred. Simple call irrecv.decode() in the while loop, and break if it returns true.

You could change your loop function, too. Separate the test for, and decoding of, the IR event from the use of the decoded value.

In the cases where you want to do something only once, set results.value to 0. In the other cases, don't change results.value.

Then, each pass through loop, the action triggered by the last IR event will be repeated, unless the event value was changed to 0.

Honestly I didn't know what to use. If I separated the decoding and the if/else how would I know what pattern to do? Either I'd have a decoded IR signal with nothing to test it against or I'd have an if/else chain that wouldn't ever get activated.

(reference the irrecv.decode() in the loop) you mean like this?

Code:
while(results.value == 1)
{
    pattern1();
        if( irrecv.decode())
        {
            break;
        }
}
Quote
You could change your loop function, too. Separate the test for, and decoding of, the IR event from the use of the decoded value.

I think I know what you mean.
Code:
void loop()
{
        switch(irrecv.decode(&results))
            {
                case power:
                    power();
                    break;
            }
}

Or am I completely missing something?
13  Using Arduino / Project Guidance / Re: Moving in and out of a do while loop? on: December 24, 2012, 06:51:51 am
See it now. Here you go.
14  Using Arduino / Project Guidance / Moving in and out of a do while loop? on: December 24, 2012, 06:41:04 am
I have an IR remote (0 - 9, up, down, left, and right) and I've got a receiver wired up to a few RGB LEDs. The on / off stuff works but the custom sequences I've made only do one round and then stop.

Is there any examples on going into a do while loop and then breaking it when another event happens?

I tried posting all of the code but it exceeded the maximum characters.
15  Using Arduino / Sensors / Re: How to connect a 2 wire ultrasonic transmitter / receiver combo? on: May 31, 2012, 04:20:08 pm
That's just a breakout board for the transmitter and receiver modules, without the required logic controller.  You'll need either a controller for it, or to build one (not an easy task).  If this box of goodies doesn't also have a controller for this breakout board, it would be far easier and cheaper to spend $10 on a complete ultrasonic sensor instead of trying to make what you have work.  If, however, you want to tinker with it, and don't care about the cost or time it will take, by all means give it a go.  Just don't expect it to be a couple of resistors and a diode and you're done.

Tim

That's exactly what I thought it was going to be. Guess I'll spend the $10 thanks for your help!
Pages: [1] 2 3 ... 5