Show Posts
Pages: [1]
1  Topics / Device Hacking / Re: Open Pandora compiling and downloading to Arduino on: July 17, 2012, 02:57:18 pm
..and here's a youtube video using the new Arduino IDE on the Open Pandora coding for 2 custom libraries and uploading to an Arduino and getting the voice recognition hardware / LCD and relays to work - all from the Open Pandora.  how cool is that?!  well, it is for me.... 



(apologies for the out-of-focus camera, but you get the idea....)
2  Topics / Device Hacking / Re: Open Pandora compiling and downloading to Arduino on: July 16, 2012, 07:47:38 am
The Arduino IDE has now been ported to run on the Open Pandora device!

Find the download on the Repo here: http://repo.openpandora.org/?page=detail&app=hdonk.arduino

I've tested it, it works well (just remember the bit about turning USB Host on and selecting the correct Serial Port).

If you have custom libraries, drop them into /mnt/utmp/hdonk_arduino/arduino/libraries (mkdir from command line and it'll work okay)
3  Topics / Device Hacking / Open Pandora compiling and downloading to Arduino on: July 08, 2012, 10:01:00 am
I thought this might be useful information if anyone else is looking to use just their Open Pandora device to program, compile and upload to their Arduino device.
(I have specifically built/coded for the Duemilanove, but with a few minor mods you could port this to other variants)

http://boards.openpandora.org/index.php?/topic/5184-arduino/#entry165715

I've uploaded a youtube video (link at end of above post), to demonstrate the C code, running make and the uploading to the Arduino itself and then the infamous flashing led doing it's thing.

I searched for quite sometime without finding any help/guidance on how to get these two devices to work together and now that I've got them to work, I thought I'd share to help anyone else out on this journey.
4  Using Arduino / Installation & Troubleshooting / Re: AnalogRead() alway is 1023 with Ethernet shield on: May 16, 2011, 05:25:25 pm
try to not use an external power supply and see if that makes it work.  I just got light sensor / temp sensor / ping and lcd working properly by not using an external power supply, but by using the arduino 5v.  I was also previously getting 1023 (=5v) reading before I switched.  do you have a photo of your setup?
5  Using Arduino / Displays / Re: Pop-168 (ATMega 168) and LCD screen on: May 15, 2011, 04:15:27 am
Nice. I think the 4-bit lcd library is ancient. You should use the included library in arduino ide. The seller/designer of this shield probably should have updated their info ages ago.

The red foam might be weakly conducting so I would not rest power-on electronics on it. smiley-wink

I've now recompiled using arduino ide LiquidCrystal library and it's still working correctly.
As a test, I reconnected the previous LCD screen to use the same pins as the new LCD screen and it still did not work (didn't even give black blocks this time).  Now I have several new LCD Keypad Shields that are working I'll keep them safe (and off the red foam!)

thanks for the help & advice
6  Using Arduino / Displays / Re: Pop-168 (ATMega 168) and LCD screen on: May 14, 2011, 09:34:36 am
The LCD Keypad Shield arrived before the new Arduino...... I thought I'd give it a try with the existing Pop-168 and using the LCD4Bit_mod library and example sketch it works perfectly okay!
I now have a working LCD screen, a working PING))), a VMusic2 / VDrive and an SDModule and an entire afternoon to myself ;-)

(thanks for the link to the car parking sensors project - looks good!)
7  Using Arduino / Displays / Re: Pop-168 (ATMega 168) and LCD screen on: May 13, 2011, 04:47:21 am
Interesting development board. Where did you get it?

It was a few years ago now, so I do not recall the exact place I purchased it, but it is from this supplier: http://www.inexglobal.com/products.php?type=micro&cat=AVR&model=popbuilder
It was a nice beginner kit, you get quite a few sensors to start off with.  Only problem nowdays is that the layout of the pins etc.. is not the same as the 'usual' Arduino info available.  That's why I've now ordered one of these: http://www.dfrobot.com/index.php?route=product/product&path=35_49&product_id=345
8  Using Arduino / Displays / Re: Pop-168 (ATMega 168) and LCD screen on: May 13, 2011, 04:40:01 am
When you get your LCD working you are going to see some funny characters if you use println() since that function is not supported by the LiquidCrystal library.  Also you don't need to set the cursor to 0,0 after clearing the display, that will happen automatically.  Why are you continually printing your name in loop()?  Stuff that isn't going to change should be in setup().

Don

Hi Don, thanks for the tips (println() and 0,0) - I'll remember that from now on.
As to printing my name in a loop, well.... that was just me trying to get something output to the LCD.
It will actually contain the output values in distance (inch/cm) from a parallax Ping))) sensor (I have this setup and working okay in a different sketch - outputs to the Serial monitor on my laptop).  I want to output that data to the LCD instead of the Serial, but to reduce complexity I just inserted my name in the above code.

tony
9  Using Arduino / Displays / Re: Pop-168 (ATMega 168) and LCD screen on: May 12, 2011, 01:16:18 pm
In your sketch you have a pin called "RW_PIN".  That should be the RS (Register Strobe) signal of the LCD, not the RW (Read/Write) signal.  Is it?

You are correct, it should have been RS_PIN rather than my misleading use of the label RW_PIN, on the board it is connected correctly.  Must have been my fat fingers pressing W instead of S  ;-)

Hmmmm...okay, well I downloaded the 00022 IDE 2 days ago, so it should be the latest.

I tried a few more things and got a bit frustrated, so I've ordered a DUEMILANOVE 328 http://www.dfrobot.com/index.php?route=product/product&path=35_38&product_id=49 - I'll give that a try with the LCD when it arrives (the board and code will match all of the existing examples).
10  Using Arduino / Displays / Pop-168 (ATMega 168) and LCD screen on: May 12, 2011, 09:51:08 am
Hi,

Okay, I've spent a good 10 hours trying to get this to work (to no avail).  I have researched / Googled for many many hours - I have read 100's of forum posts and suggestions.  None seem to work for me.  So, now I am asking for help on this forum.

I purchased a Pop-168 ATMega168 Matchbox as a Pop-builder kit a few years ago - I moved house and it got tucked away in a cupboard until a few days ago when I re-found it!  I have been using an LCD screen with a Basic Stamp 2 and it works fine.

I installed arduino-0022 and noticed that a new LiquidCrystal library has been included (I think the last time I used this it was version 007!) I thought it would be good to hook the two together.  I tested the Pop-168 with some basic tests to make sure it was working okay.  It flashes LEDs, plays sounds and reacts to button presses.  Excellent!  I successfully uploaded code and it executes okay, so I know the device itself is oky.

I took a look at: http://www.ladyada.net/learn/lcd/charlcd.html and it seemed simple enough - I just had to translate the Pins used to the ones on the Pop-168 (see schematic_01.jpg attached below).

Originally I just attempted to output text to the LCD.  This only resulted in the Black boxes being displayed.  I read about attaching a 10k POT, I tried that and whilst the contrast went up and down it didn't make any difference.  I then read that I could just connect LCD Pin 3 to GND to get max contrast, so I opted for that to reduce dependencies.

As a test I then extended the sample code to flash an LED and play a sound so that I could confirm that the code was working okay.  Here is the code I am currently using:
Code:
#include <LiquidCrystal.h>

#define LED1_PIN 2
#define SND1_PIN 3

#define RW_PIN   9
#define EN_PIN   8
#define D4_PIN   4
#define D5_PIN   5
#define D6_PIN   6
#define D7_PIN   7

LiquidCrystal myLcd(RW_PIN, EN_PIN, D4_PIN, D5_PIN, D6_PIN, D7_PIN);

void setup() {
  pinMode(LED1_PIN, OUTPUT);
  noTone(SND1_PIN);  

  myLcd.begin(16,2);
  myLcd.println("Hello World!");

  tone(SND1_PIN, 400, 200);
}

void loop() {
  digitalWrite(LED1_PIN, HIGH);
  delay(1000);

  myLcd.clear();
  myLcd.setCursor(0,0);
  myLcd.println("tony");

  digitalWrite(LED1_PIN, LOW);
  tone(SND1_PIN, 623, 400);
  delay(1000);
  noTone(SND1_PIN);
}

As you can see I have used a breadboard and attempted to make the connections as clean / tidy as possible.  I set the LCD Pins 7-10 to GND just to be sure.

LCD PIN         POP-168
1          GND      12
2          +5v       10
3          V0        12 (gnd)
4          RS         9
5          R/W      12 (gnd)
6          EN         8
7          D0         12 (gnd)
8          D1         12 (gnd)
9          D2         12 (gnd)
10         D3         12 (gnd)
11         D4         4
12         D5         5
13         D6         6
14         D7         7
15         +           (backlight not used)
16         -           (backlight not used)


As you can see in the pictures, all I am displayed is a row of Black blocks instead of the "Hello World" and "tony" text.
I tried the Serial example also, when I type some text and send it to the Pop-168 it just displays that same set of Black blocks.

I have a DC Input to the Pop-168, I also tried using a separate power supply directly to the LCD (just incase) - this made no difference.

I tried another LCD screen (same as previous one), that outputs exactly the same.  I can confirm that the LCD screens are working okay and that the Pop-168 is working okay.

To me, it looks like the LCD screen is not being initialized correctly via the Library code - is this a correct assumption?

any help / guidance greatly appreciated!

thanks

tony
Pages: [1]