Show Posts
Pages: [1] 2
1  Using Arduino / Project Guidance / Re: How to protect a humidity sensor on: March 30, 2012, 02:49:22 am
Now I learned something new smiley

Maybe I can do this in micro size smiley

//Peter
2  Using Arduino / Project Guidance / How to protect a humidity sensor on: March 29, 2012, 02:32:35 pm
Hi all

I have this http://www.sparkfun.com/products/8257 humidity sensor
I´m building a a small grow house for fun and I wonder how to protect the sensor
when the humidity gets so high that water drops are starting to form..


//Peter
3  Using Arduino / Displays / Re: Simple Glcd Menu on: March 01, 2011, 08:13:02 am
Of curse not smiley-wink

can you explain what hapends at "currentPage = ( currentPage + 1 ) % MAX_PAGES;"
4  Using Arduino / Displays / Re: Simple Glcd Menu on: March 01, 2011, 07:22:08 am
hmm is not void loop() needed ?

/Peter
5  Using Arduino / Displays / Re: Simple Glcd Menu on: March 01, 2011, 05:26:35 am
I get an error on this line

currentPage = ( currentPage + 1 % ) MAX_PAGES;

LOG
sketch_mar01a.cpp: In function 'void buttonFunc()':
sketch_mar01a:19: error: expected primary-expression before ')' token
sketch_mar01a:19: error: expected `;' before numeric constant
sketch_mar01a.cpp: In function 'void showCurrentPage()':
sketch_mar01a:39: error: 'reset' was not declared in this scope

cheers
6  Using Arduino / Displays / Re: Simple Glcd Menu on: March 01, 2011, 04:15:11 am
Can someone please post an little example code besides the one i found references
helps me learn quicker..

thanks
Peter
7  Using Arduino / Displays / Re: Simple Glcd Menu on: March 01, 2011, 03:41:10 am
Ok got it to work but not as good as I like it to..
here is the code please advise on checking button state without delays


Code:
#include <ks0108.h>
#include <Arial14.h>
#include "SystemFont5x7.h"
#include "Wag120x32.h"

const int buttonPin = 2;
int buttonState = 0;
int pag = 0;


void setup(){
  pinMode(buttonPin, INPUT);
  GLCD.Init(NON_INVERTED);
  GLCD.ClearScreen();  
  GLCD.SelectFont(System5x7);
}


void loop(){


  switch (pag) {
  case 0:
    introScreen();
    break;
  case 1:  
    page2();
    break;
  case 2:
    page3();
    break;
  case 3:
    page4();
    break;
  case 4:
    reset();
    break;
  }
  
 }

void introScreen(){
//  GLCD.ClearScreen();
  GLCD.DrawBitmap(Wag120x32, 4,1, BLACK);
  delay(1000);
  GLCD.CursorTo(3,4);
  GLCD.Puts("CPS");
//  delay(1000);
  GLCD.CursorTo(14,7);
  GLCD.Puts("FW 1.01");
  button();
}

void page2(){
//  GLCD.ClearScreen();
  GLCD.CursorTo(3,4);
  GLCD.Puts("Page 2");
  button();
}

void page3(){
//  GLCD.ClearScreen();
  GLCD.CursorTo(3,4);
  GLCD.Puts("Page 3");
  button();
}

void page4(){
//  GLCD.ClearScreen();
  GLCD.CursorTo(3,4);
  GLCD.Puts("Page 4");
  button();
}

void reset(){
pag = 0;
}

void button(){
  buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH) {        
    pag++;
    GLCD.ClearScreen();
    delay(1000);  
  }
}
8  Using Arduino / Displays / smaler font than SystemFont5x7 on: March 01, 2011, 02:38:25 am
Is there a smaller font for use that is still readable?

/Peter
9  Using Arduino / Displays / Re: Simple Glcd Menu on: March 01, 2011, 02:23:49 am
Ok

how do i do a simple a simple step loop
i mean buton push goto and stay there smiley next push goto and stay there..


/Peter
10  Using Arduino / Displays / Simple Glcd Menu on: February 28, 2011, 04:19:00 pm
Hi

I have created three pages for my glcd and they look alright
but what is the simplest way to step through the with a push of a button

cheers Peter
11  Using Arduino / Displays / Re: GLCD problem on: February 28, 2011, 05:22:18 am
Sorry for the delayed response and thanks for all the help

Contrast issue is now solved..

Solution for this GLCD was:
Vdd to +5V and trim pot
V0 to wiper
and -9V to trim pot and +9V down to Vss

maybe someone can re write this in the right way I doubt my way was right

/Peter
12  Using Arduino / Displays / Re: GLCD problem on: February 18, 2011, 03:08:48 am
Thanks for the post bperrybap

haven't had time to test more at the moment
Still think I should get some kind of response from screen when I'm turning the trim pot
but I'm probably wrong smiley
13  Using Arduino / Displays / Re: GLCD problem on: February 16, 2011, 11:01:49 am
I now have a 0 to -5V on wiper still cant see anything or affect the contrast
odd
/Peter
14  Using Arduino / Displays / Re: GLCD problem on: February 16, 2011, 03:16:41 am
no it does not but i can measure the wiper and i get 0 to 5v on that side so it seems to be working.

/Peter
15  Using Arduino / Displays / Re: GLCD problem on: February 15, 2011, 04:33:54 pm
yes
Pages: [1] 2