Show Posts
Pages: 1 [2] 3 4 ... 243
16  Using Arduino / Project Guidance / Re: First project: too much choice. on: August 28, 2014, 03:14:40 pm
Try one of these then.

*fixed it smiley
Arduino robot kits DIY
17  Using Arduino / Displays / Re: Good Tutorial To Learn 7" LCD Screen With Shield For Arduino Mega or Due? on: August 28, 2014, 02:51:00 pm
What library did it come with? Or what library did you download for it?

Did you try the UTFT and UTouch libraries from Henning Karlsen's website?
18  Using Arduino / Displays / Re: How To Scroll String Only On Second Line Using 2x16 LCD? on: August 28, 2014, 01:57:26 pm
Don't use Strings, use C strings, less memory and issues down the road.

How long will the text be?

I made this a while back, Im not sure if it what your looking for but give it a try.
Note the library, change the parts to allow it to work on your LCD.
Code:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define N_CHARS  ((sizeof(MessageOut)/sizeof(MessageOut[0]))-1)
#define N_CHARS2  ((sizeof(MessageOut2)/sizeof(MessageOut2[0]))-1)
LiquidCrystal_I2C lcd(0x20,20,4);  // set the LCD address to 0x20 for a 16 chars and 2 line display

char MessageOut[21];
char MessageOut2[21];
 
int index = 19, index2 = 0;
unsigned long oldTime = 0, oldTime2 = 0;

void setup()
{
  lcd.init();                      // initialize the lcd 
  lcd.backlight();
}

void loop()
{
  setHeadingRight("Hello", 0, 1000); // message, row, duration
  setHeadingLeft("Welcome", 1, 500);
}

void setHeadingRight(char * msg, byte row, unsigned long duration)
{
  strncpy(MessageOut, msg, sizeof(MessageOut));
  if(millis() - oldTime > duration) // check the difference of the current time "millis()" to the previous time "oldTime" against the duration you want.
  {
    oldTime = millis(); // update oldTime with the current time
    if(index >= 0) // make sure the index does not go under 0
    {
      index--; // decrecment index by 1
      for (int i = 0; i < N_CHARS; i++) // this part here displays the message on the display
      {
        lcd.setCursor(i,row); // set the column to show the element in the array
        if(index == N_CHARS) index = 0; // set index back to 0 if the index has reached the arrays max size.
       
        if(MessageOut[index++] != NULL) // if the element @ index is anything but NULL, show it.
          lcd.print(MessageOut[index-1]);
        else
          lcd.print(' '); // if the element @ index is NULL, display a space. 
      }
    }
    else index = 19; // if index is less than 0, then set it back to 19
  }
}

void setHeadingLeft(char * msg, byte row, unsigned long duration2)
{
  strncpy(MessageOut2, msg, sizeof(MessageOut2));
  if(millis() - oldTime2 > duration2)
  {
    oldTime2 = millis();
    if(index2 < 20) // check to see if index2 is under the array max size
    {
      index2++; // increment index
      for (int i = 0; i < N_CHARS2; i++) // same as above
      {
        lcd.setCursor(i,row);
        if(index2 == N_CHARS2) index2 = 0;
       
        if(MessageOut2[index2++] != NULL)
          lcd.print(MessageOut2[index2-1]);
        else
          lcd.print(' ');
      }
    }
    else index2 = 0; // otherwise set it back to 0
  }
}

19  Using Arduino / Programming Questions / Re: Communication between 2 arduino uno with HC-05 on: August 28, 2014, 10:50:53 am
What exactly are you trying to do? The bluetooth modules should automatically pair to one another, but to connect to a computer, you must pair them with the passcode "1234"
20  Using Arduino / Networking, Protocols, and Devices / Re: Help! Program hangs at endTransmission when initializing Wii Classic Controller on: August 28, 2014, 12:25:56 am
What arduino software version are you using?

Post any pictures and information you have and I or someone else will look it over. I am going to bed, it's 1:30 am for me and I have work in the morning.

Will talk then.
21  Using Arduino / Project Guidance / Re: components needsed for 2 wheel trolley from eBay ? on: August 28, 2014, 12:16:23 am
Check out this video here
http://youtu.be/PbPrgxsBt50
22  Using Arduino / Networking, Protocols, and Devices / Re: Help! Program hangs at endTransmission when initializing Wii Classic Controller on: August 27, 2014, 11:58:55 pm
I well I can assure you it's not the code, so it could either be like you said a hardware issue or wiring issue. Could you post a picture of how it's wired?
23  Using Arduino / Project Guidance / Re: components needsed for 2 wheel trolley from eBay ? on: August 27, 2014, 11:52:44 pm
Quote
Does anyone have any experience of the quality of these 2 or 4 wheel "robot chassis" from eBay etc
they aren't that fast and they can be quite noisy.

Probably better off getting a cheap rc, or build one from Legos or an Erector set.
24  Using Arduino / Networking, Protocols, and Devices / Re: Help! Program hangs at endTransmission when initializing Wii Classic Controller on: August 27, 2014, 11:42:26 pm
If you want, you can try my library. It's in here, download the newest one at the bottom.
25  Development / Other Software Development / Re: New peek function for HardwareSerial on: August 27, 2014, 08:29:16 pm
The code I gave was just an example to show how the peek function would be useful.
26  Using Arduino / Programming Questions / Re: anyone can help me in this tiny code for the LCD display on: August 27, 2014, 07:43:16 pm
Not sure how this is different from your last post but before they are merged, you can learn from this.
I uses a different library, but it should be fairly simple to change to the one your using.

Code:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
uint8_t bar0[8]  = {
  0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
uint8_t bar1[8]  = {
  0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10};
uint8_t bar2[8]  = {
  0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18};
uint8_t bar3[8]  = {
  0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C};
uint8_t bar4[8]  = {
  0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E};
uint8_t bar5[8]  = {
  0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F};
int i,j=0, number=1;
LiquidCrystal_I2C lcd(0x20,20,4);  // set the LCD address to 0x20 for a 16 chars and 2 line display

void setup()
{
  Serial.begin(9600);
  lcd.init();                      // initialize the lcd
  lcd.backlight();
  lcd.createChar(0, bar0);
  lcd.createChar(1, bar1);
  lcd.createChar(2, bar2);
  lcd.createChar(3, bar3);
  lcd.createChar(4, bar4);
  lcd.createChar(5, bar5);
  lcd.home();
  lcd.print("Hello world...");
  delay(1000);
}
void loop()
{
  bargraph(analogRead(A0), 1, 0, 16); //  (pin, row, start on display, end on display)
  //bargraph(analogRead(A6), 3, 0, 20);
}
void bargraph(int data, int row, int start, int end)
{
  j = map(data, 0, 1023, 0, (6*end) - (6*start));
  if(number <= j){
    for(number; number < j; number++){
      i = number / 6;
      lcd.setCursor(i+start,row);
      lcd.write(number % 6);
    }
  }
  else {
    for(number; number > j; number--){
      i = number / 6;
      lcd.setCursor(i,row);
      lcd.write(number % 6);
    }
  }
  Serial.print(number);
   Serial.print(" ");
   Serial.println(i);
}
27  Development / Other Software Development / Re: Updated Wii Classic Controller Library on: August 27, 2014, 10:10:12 am
Another minor update.

Version 1.02:
  Added two new functions:

    SetLeftStick_Factors(byte, byte)
    SetRightStick_Factors(byte, byte)

    These multiply the returned values from the joysticks. 1: Lowest(0 - 31 range) to 8: Highest(0 - 248 range)

Sudo example:
Quote
SetLeftStick_Factors(1, 8 ); // X_axis, Y_axis

. . .

leftStickX() returns a range between (0 - 31)    // smooth
leftStickY() returns a range between (0 - 248) // choppy
28  Using Arduino / Project Guidance / Re: Help Design The Uber Arduino BBQ Trailer & Camp Site on: August 27, 2014, 08:42:16 am
What is your level of experience with electronics and electronic components as well as soldering?

Quote
Camp Control System: Wanted to integrate the 7" LCD screen into the trailer and arduino setup somewhere. It'd be nice to setup the touch screen to control different stuff around the camp like the music, the lights, and the grills.
Difficult but not impossible

Quote
Sound System: Wanted to add a few nice speakers and amp to the trailer. If they could be controlled by an arduino in some way, that'd be cool.
You can probably turn the AMPs on and off with a relay but as far as change a radio station from the radio itself, not going to happen, unless you make the radio yourself. (or get a small radio module).

Quote
Light System: Wanted to add both flood lights, and maybe some LED light strips that would respond to the music of the sound system.
Motorize Some Stuff: I think it'd be sweet if we could motorize some stuff.  Like maybe have it so the hot water heater setup so it can slide out from the side of the trailer and you can just connect the hoses to it.
Again not impossible if you have the right parts

Quote
Weather Station/Motorized Flag Pole: Something that would be cool is to have a weather station that alerts us to inclement weather. Maybe an anemometer could be added to a motorized flag pole to monitor stuff like that?
I am not sure there is a way to do this with an Arduino. smiley-sad
The flagpole however can be done if you have the right parts.
29  Using Arduino / Programming Questions / Re: Joystick robot controller on: August 27, 2014, 08:28:03 am
Before you're moved, see this thread. look at reply #19.

http://forum.arduino.cc/index.php?topic=262762.msg1855000#msg1855000
30  Using Arduino / Programming Questions / Re: External power supply for servos using 7805 on: August 26, 2014, 05:22:36 pm
Yes of course it is going to work but it is not good for the arduino. Once you put a load on the servo the arduino is dead.
Pages: 1 [2] 3 4 ... 243