Show Posts
Pages: [1] 2 3 ... 5
1  Using Arduino / Displays / Re: Problems with GLCD and Arduino Mega (1280) on: December 26, 2011, 09:41:05 am
Hmm, still issues, when I wire it corresponding to the pins labeled in ks0801_Mega.h (ie, #define CS1 32 would go from CS1 on the LCD pinout to pin 32 on the mega) I get no result
2  Using Arduino / Displays / Re: Problems with GLCD and Arduino Mega (1280) on: December 26, 2011, 07:40:38 am
also after removing the ks0801 library from the library folder, and replacing my glcd rc2 with rc3, it is not able to find the ks0108.h file included in the headers for the sketch, did the filename change with glcd?

EDIT:

I edited the header files to read:
  #include <glcd.h>  // library header
  #include <fonts/Arial14.h>  // font definition for 14 point Arial font.
  #include "fonts/SystemFont5x7.h"   // system font
  #include "bitmaps/ArduinoIcon.h"     // bitmap 

i assumed that ks0108.h changed to glcd.h and had to include the filepaths inside of libary/glcd/ to get them to work, i'll try it with the wiring implied by the glcd mega header
3  Using Arduino / Displays / Re: Problems with GLCD and Arduino Mega (1280) on: December 26, 2011, 07:31:59 am
I'm also assuming that pin4...7 on the duelmilanove is the same as on the mega, is that correct? also it seems from the schematic that the enable lines are swiched? is that right? Because when I look at the ks0108_Mega file, I see the pinouts are labeled completely different.
4  Using Arduino / Displays / Problems with GLCD and Arduino Mega (1280) on: December 25, 2011, 02:24:48 pm
Hey guys! Merry Christmas!

I'm working with one of these:
http://www.sparkfun.com/products/710

on an arduino mega, I used the output set A on these instructions:
http://www.arduino.cc/playground/Code/GLCDks0108

and I wired it according to this diagram:
http://www.arduino.cc/playground/uploads/Code/KS0108_wiring.jpg

I uploaded the sketch to my mega and all I get on the screen is a bunch of random horizontal lines, so what I did was put in serial.println commands to see at what point the code was failing, I found that it was stopping at :
Code:
 GLCD.DrawBitmap(ArduinoIcon, 32,0, BLACK); //draw the bitmap at the given x,y position
  delay(3000);

Also I notice that I cannot upload the sketch if the reset button is wired into what is labeled as the correct port (line 14 > the reset button next to the 5v+)

Any ideas from anyone? Also I've tried both the GLCD v3 RC2 and RC3 and I included #define __AVR_ATmega1280__ in the headers for the sketch.

EDIT: also here is my sketch code with the diagnostics, I tried commenting out the DrawBitmap command and it error'ed out at the next Draw command in the while() loop so I'm figuring it must be something to do with my wiring, also I will upload a vid of my LCD freaking out momentarily.

Code:
  #include <ks0108.h>  // library header
  #include <Arial14.h>  // font definition for 14 point Arial font.
  #include "SystemFont5x7.h"   // system font
  #include "ArduinoIcon.h"     // bitmap 
  #define __AVR_ATmega1280__

  unsigned long startMillis;
  unsigned int iter = 0;

void setup(){
  Serial.begin(9600);
  Serial.println("start checkpoint NEW");
  GLCD.Init(NON_INVERTED);   // initialise the library
  Serial.println("start checkpoint 1");
  GLCD.ClearScreen(); 
  Serial.println("start checkpoint 2");
  GLCD.DrawBitmap(ArduinoIcon, 32,0, BLACK); //draw the bitmap at the given x,y position
  delay(3000);
  Serial.println("start checkpoint 3");
  GLCD.ClearScreen();
  GLCD.SelectFont(System5x7);       // select fixed width system font
  Serial.println("start checkpoint");
}

void loop(){ // run over and over again
  Serial.println("checkpoint 1");
  startMillis = millis();
  Serial.println("checkpoint 2");
  while( millis() - startMillis < 1000){ // loop for one second
    Serial.println(startMillis);
    GLCD.DrawRect(0, 0, 64, 61, BLACK); // rectangle in left side of screen
    GLCD.DrawRoundRect(68, 0, 58, 61, 5, BLACK);  // rounded rectangle around text area   
    for(int i=0; i < 62; i += 4)
      GLCD.DrawLine(1,1,63,i, BLACK);  // draw lines from upper left down right side of rectangle 
    GLCD.DrawCircle(32,31,30,BLACK);   // draw circle centered in the left side of screen 
    GLCD.FillRect(92,40,16,16, WHITE); // clear previous spinner position 
    GLCD.CursorTo(5,5);               // locate curser for printing text
    GLCD.PrintNumber(++iter);         // print current iteration at the current cursor position
  }
  Serial.println("checkpoint 3");
  // display number of iterations in one second
  GLCD.ClearScreen();               // clear the screen 
  GLCD.CursorTo(13,2);              // positon cursor 
  GLCD.Puts("FPS= ");               // print a text string 
  GLCD.PrintNumber(iter);           // print a number
 }
5  Using Arduino / Installation & Troubleshooting / Re: avrdude error: 0x00 not in sync on: December 17, 2011, 06:47:38 am
Update: Turns out the program WORKS but what it does it runs pin 1 HIGH and LOW (obviously), and I have learned that PIN 1 is the TX pin! I'm an idiot, does anyone know how I can flash the program some other way? I'm guessing this is why upload isn't working.
6  Using Arduino / Installation & Troubleshooting / avrdude error: 0x00 not in sync on: December 17, 2011, 06:41:44 am
Hey guys,

I did a bread-boarded arduino per the instructions on this page:
http://arduino.cc/en/Tutorial/ArduinoToBreadboard

and it worked in uploading my first sketch which was:
Code:
int ledPin = 1;                 // LED connected to digital pin 13

void setup()
{
  pinMode(ledPin, OUTPUT);      // sets the digital pin as output
}

void loop()
{
  digitalWrite(ledPin, HIGH);   // sets the LED on
  delay(1000);                  // waits for a second
  digitalWrite(ledPin, LOW);    // sets the LED off
  delay(1000);                  // waits for a second
}

and I wired an LED from pin1 to GND,

first off, the sketch doesnt work (i think because i need to be using a resistor to ground)

and every time I try to upload a new sketch I get the following error:
Code:
avrdude: stk500_getsync(): not in sync: resp=0x00
I've tried all the usual troubleshooting tips, reboot comp, unplug everything etc. and obviously I took the LED out.

Does anyone know how to fix this issue?

after that every time I tried to upload a sketch I got a

7  Forum 2005-2010 (read only) / Syntax & Programs / Re: Just starting out, writing in java? want c++ on: December 26, 2009, 02:52:24 pm
will do, thanks again for the help.

Its funny i was actually already using the analogWrite function with delay to create a little LED display so i guess i already have a bit of experience  smiley-razz.
8  Forum 2005-2010 (read only) / Syntax & Programs / Re: Just starting out, writing in java? want c++ on: December 26, 2009, 02:30:13 pm
i assume that new and delete are listed under the documentation so ill take a closer look at that when i get some time.

As for the PWMs is there certain commands that i can use to manipulate them? something i could look up in the documentation perhaps?
9  Forum 2005-2010 (read only) / Syntax & Programs / Re: Just starting out, writing in java? want c++ on: December 26, 2009, 02:15:27 pm
oh so i should be writing in C++ syntax?
10  Forum 2005-2010 (read only) / Syntax & Programs / Re: Just starting out, writing in java? want c++ on: December 26, 2009, 01:21:11 pm
so that basically means im writing C++ in java? whats the sense in that?
11  Forum 2005-2010 (read only) / Syntax & Programs / Re: Just starting out, writing in java? want c++ on: December 26, 2009, 01:07:02 pm
alright will do! thanks for the help.

 What exactly do you mean by java is processing and the arduino is c++?

Also i HAVE been reading up a bit on PWMs, I understand that theyre basically digital potentiometers but beyond that im not exactly sure what they can do.
12  Forum 2005-2010 (read only) / Syntax & Programs / Just starting out, writing in java? want c++ on: December 26, 2009, 12:51:59 pm
Hello,

This is my first post on the board so if im missing some big READ HERE FIRST or NEWBIES GO HERE sign (which i looked for for some time) I guess I'll just ask here.

I have never really done much hardware programming, or really programming in general, besides some rudementary C++ programs, some slightly more complicated java and a whole bunch of perl scripts.

I just got the arduino mega for christmas and immediately proceeded to try and put some code on it. I downloaded the arduino software/driver pack, installed the serial to USB driver, and opened the arduino programming interface (which i must add is VERY nice). I followed a guide online that showed me how to get LEDs to switch on and off and made a little light display for my girlfriend and parents to show them that their money would not be wasted  smiley-wink.

The first thing i noticed is that im programming in java! What id really like to do is be programming in C++ just due to the simple fact that C++ allows you so much more flexibility, is this possible? is it more practical for someone who wants to really get deep into the thick of it?

Also im not really sure how the arduino WORKS. Ive worked with terms like bootloader and EEPROM but i have no idea how they apply to this little (basically) mini computer. Also i have no idea how the binary works to run all of the hardware, id really like to get into the nitty gritty of the thing because i love to understand how it all ticks.
13  Forum 2005-2010 (read only) / Development / Re: N64 Controller: Done reasearch, need a pros help on: January 31, 2010, 03:21:37 pm
sorry for the GIGANTIC image...damn [img] tags wont let me resize smiley-razz
14  Forum 2005-2010 (read only) / Development / Re: N64 Controller: Done reasearch, need a pros help on: January 31, 2010, 02:41:46 pm
sweeeeeeet sweeeeet VICTORY! got the controller working! built this:

from an atmega328 and instructions from this instructables:http://www.instructables.com/id/Build-Your-Own-Arduino/step2/Setting-Up-Power/

also i can now, thanks to that schematic, hook up a rechargable battery, all i need to do now is work out which components can be removed from the setup when i make the arduino standalone, unfortunately sparkfun fuddled up my order and left a few 28 pin dip sockets out so no perminant soldering can commence till they come. In the meantime im going to work on the RF reciever/transmitter
15  Forum 2005-2010 (read only) / Development / Re: N64 Controller: Done reasearch, need a pros help on: January 21, 2010, 12:41:07 am
im thinking it might just be easiest to write out to the rf transmitter as you would a serial port without the signal verification, even if the data is corrupted several times consecutively it wont be enough to effect an entire frame of the game....i think..anyways gotta put it to the test somehow....
Pages: [1] 2 3 ... 5