Show Posts
Pages: [1] 2 3
1  Forum 2005-2010 (read only) / Troubleshooting / Re: Problems with code. Please Help on: January 03, 2009, 11:30:41 am
mem, I did what you said and it works perfectly!!!

YOU ARE MY HERO!!!!!

Thanks

Nigel
2  Forum 2005-2010 (read only) / Troubleshooting / Re: Problems with code. Please Help on: January 03, 2009, 11:10:40 am
Im trying to compile the code from the first post
Heres the errors Im getting:

To cool for typing it all out cause it wont paste, so click on the link 8-) :
http://picasaweb.google.com/HELLOwhereiseveryone/Screenshot#

You can zoom in with the magnifing glass in the upper right hand corner.

Nigel
3  Forum 2005-2010 (read only) / Troubleshooting / Re: Problems with code. Please Help on: January 03, 2009, 10:30:39 am
Oh sorry smiley-razz
You can find the files here:
http://www.arduino.cc/playground/Code/LCD

Look for:
Optrex IM050240 Serial LCD Driver (PCB marked with PWB50240-CEM). These

Haha I sorta mis-interpreted your post :smiley

I will post the exact errors in the next post

Thanks

Nigel
4  Forum 2005-2010 (read only) / Troubleshooting / Re: Problems with code. Please Help on: January 03, 2009, 09:57:12 am
Its located in:
C:\Documents and Settings\Nigel\My Documents\Stuff\arduino-0012-win\arduino-0012\hardware\libraries

Nigel
5  Forum 2005-2010 (read only) / Troubleshooting / How to get IM50240 LCD Library working (fixed) on: January 02, 2009, 06:16:30 pm
Code:

 #include <OptrexLCD.h>
#include <MsTimer2.h>

// This example displays an unsigned counter, starting from 2000,
// incrementing it with each LCD refresh (this is not too fast).
// Additionally, it will alternate with showing the word "Clear",
// then "Secure", and then both, and finally neither of those
// words (at the left of the display).
//
// Before running this, either wire the OptrexLCD IM50240
// (PWB50240-CEM) to the pins shown below, or modify the pin
// assignments to match your own wiring. The Optrex LCD
// wiring is documented in OptrexLCD.h
//
// Note that the MsTimer2 used by this driver, uses timer 2

void
setup(void) {
  /*
   * Change these to your own ATmega168 I/O pin preferences, if necessary :
   * (The values shown are the defaults ATmega168 I/O pin numbers)
   */
  OptrexLCD::set_M_pin(2);        // Wired to 50% duty cycle clock (M), pin 4 on LCD PCB
  OptrexLCD::set_Shift_pin(3);    // Wired to Shift clock,              pin 3 on LCD PCB
  OptrexLCD::set_Latch_pin(7);    // Wired to Latch clock,              pin 2 on LCD PCB
  OptrexLCD::set_Din_pin(10);     // Wired to Input data,               pin 1 on LCD PCB

  OptrexLCD::initialize();        // Start the OptrexLCD driver
}

void loop() {
  unsigned counter = 2000;              // Arbitrarily start our counter at 2000

  for(;;) {                             // Repeat forever, using our counter above..
    OptrexLCD::wait_latched();          // Block until a LCD latch event occurs (1 refresh)
    OptrexLCD::write_uint(counter++);   // Convert counter to 4 digits and display that until further notice

    switch ( counter % 4 ) {            // Calculate a remainder, and use that to...
    case 0 :                            // Show "CLEAR" but not "SECURE"
      OptrexLCD::set_clear(true);
      OptrexLCD::set_secure(false);
      break;
    case 1 :                            // Don't show "CLEAR", but show "SECURE"
      OptrexLCD::set_clear(false);
      OptrexLCD::set_secure(true);
      break;
    case 2 :                            // Show both "CLEAR" and "SECURE"
      OptrexLCD::set_clear(true);
      OptrexLCD::set_secure(true);
      break;
    case 3 :                            // Don't show "CLEAR" or "SECURE"
      OptrexLCD::set_clear(false);
      OptrexLCD::set_secure(false);
    }
  }
}

// End OptrexLCD driver example



 

Can anyone tell me whats wrong with this code? It says Im missing some "()"?

If you need more detail to help me just post.

Thanks

Nigel
6  Forum 2005-2010 (read only) / Interfacing / Re: Using arduino as a MIDI Input Device on: January 13, 2009, 11:08:43 am
Hello, I recently was trying to get the MIDI IN ciruit to work but my optocouple output only changed .1 volts when I applied voltage to the midi jack? Can someone help?

Thanks

Nigel
7  Forum 2005-2010 (read only) / Interfacing / Eagle Library question on: January 07, 2009, 08:07:17 pm
Is there a library that has a female midi jack and a pot thats looks like this:http://www.kelvin.com/Merchant2/merchant.mv?Screen=PROD&Product_Code=110130&Category_Code=ELPCPTVP

Thanks

Nigel
8  Forum 2005-2010 (read only) / Troubleshooting / Re: Arduino Diecimila not loading sketch!! on: January 01, 2009, 12:28:07 am
Sorry I will try to be more specific.

 It started when I plugged my arduino into a 9 volt wall wart. the black chip between the power jack and the ext / usb headers heated up so I unplugged it. I tried using the usb cable but when I plugged it in the power light only lit up for a second, then went out. I let it cool down for half an hour and when I plugged it in the power worked fine, but it wouldnt upload a schetch, it would just say the errors from the last post. I tried switching serial ports, switching usb plugs, resetting it, using external power, nothing seems to work. Sometimes when I try to upload a schetch the Rx light flickers, but only a little bit, but I tried it recently and I dont get anything. The computer seems to still recognize the arduino when I plug it in, because it makes that sound when you plug something into usb, so there is some kind of connection.

Hope this is enough detail for you to help me!!

Thanks a lot

Nigel
9  Forum 2005-2010 (read only) / Troubleshooting / Arduino Diecimila not loading sketch!! on: December 31, 2008, 10:04:18 pm
My arduino isnt uploading sketches, though the power light is on. The Rx an Tx dont light up at all and I get this error:

avrdude: stk500_getsync() : not in sync: resp=0x00
avrdude: stk500_disable() : protocal error, expect=0x14, resp=0x51

Can someone please tell me what this means??!!

thanks

nigel
10  Forum 2005-2010 (read only) / Troubleshooting / Re: Best rechargeable battery setup for Arduino BT on: August 29, 2008, 08:04:57 am
The best choice for type of battery would bu lythium polymer. They last a really long time even when using multple motors. You can get them at a hobby shop. They cost about 25 canadian for the battery and charger. Hope that helps
11  Forum 2005-2010 (read only) / Interfacing / Re: How do I control fan speed on 12V DC fan? on: January 07, 2009, 08:30:56 pm
I think this might work Basically divides the analog val by 4:(I think there is easier ways of writing this though)
Code:
int fanA= 3;
int fanB = 5;
int fanC= 6;


int fanaVal = 0;
int fanbVal = 0;
int fancVal = 0;
int potpinA = 0;
int potpinB = 1;
int potpinC = 2;

char controlChar;

void setup() {}



void loop() {
fanaVal = analogRead(potpinA);
fanbVal = analogRead(potpinB);
fancVal = analogRead(potpinC);
fanaVal = fanaVal / 4;
fanbVal = fanbVal / 4;
fancVal = fancVal / 4;

analogWrite(fanA, fanaVal);
analogWrite(fanB, fanbVal);
analogWrite(fanC,fancVal);
}

Also Im interested in your mechanical setup, could you post some pictures?

Thanks

Nigel
12  Forum 2005-2010 (read only) / Interfacing / Re: How do I control fan speed on 12V DC fan? on: January 07, 2009, 08:03:30 pm
Logorythmic pots are designed for audio volume control.
Linear are the kind of pots you want.
13  Forum 2005-2010 (read only) / Interfacing / Re: How do I control fan speed on 12V DC fan? on: January 07, 2009, 08:00:03 pm
Just a suggestion. If you want more fine tuning, you could get multi rotation pots. This way you could get double or triple resolution. (of course the resolution is limited by the ADC). Also I have used 5k and 10k pots for my project and I found that higher value pots didn't really help.

Just a thought

Nigel
14  Forum 2005-2010 (read only) / Interfacing / Re: How do I control fan speed on 12V DC fan? on: January 07, 2009, 06:59:55 pm
The analogWrite functions only work with pins marked with PWM! You need to change the motor pins to ones marked with PWM.

That should solve your problem!

Nigel
15  Forum 2005-2010 (read only) / Interfacing / Re: How do I control fan speed on 12V DC fan? on: January 06, 2009, 09:28:13 pm
int bluePin = 9;
int redPin = 10;
int greenPin = 11;


int blueVal = 0;
int redVal = 0;
int greenVal = 0;
int potpinA = 0;
int potpinB = 1;
int potpinC = 2;

char controlChar;

void setup() {
 


void loop() {
blueVal = analogRead(potpinA);
redVal = analogRead(potpinB);
greenVal = analogRead(potpinC);

analogWrite(bluePin, blueVal);
analogWrite(redPin, redVal);
analogWrite(greenPin,greenVal);
}

Attatch pots to analog 0,1,2. Should work smiley-wink

Nigel
Pages: [1] 2 3