Then I'm assuming SPLC780D is HD44780 compatible. Good to know. I am surprised they don't come out and say that, since the HD44780 seems to be the name people recognize.
/home/spuzzum/arduino-0018/libraries/Button/Wiring.h:69: error: "˜uint8_t' does not name a type
/home/spuzzum/arduino-0018/libraries/Button/Wiring.h:70: error: "˜uint8_t' does not name a type
/home/spuzzum/arduino-0018/libraries/Button/Button.cpp: In constructor "˜Button::Button(uint8_t, uint8_t)':
/home/spuzzum/arduino-0018/libraries/Button/Button.cpp:41: error: "˜bitWrite' was not declared in this scope
/home/spuzzum/arduino-0018/libraries/Button/Button.cpp: In member function "˜bool Button::isPressed()':
/home/spuzzum/arduino-0018/libraries/Button/Button.cpp:87: error: "˜bitRead' was not declared in this scope
/home/spuzzum/arduino-0018/libraries/Button/Button.cpp:87: error: "˜bitWrite' was not declared in this scope
/home/spuzzum/arduino-0018/libraries/Button/Button.cpp: In member function "˜bool Button::wasPressed()':
/home/spuzzum/arduino-0018/libraries/Button/Button.cpp:158: error: "˜bitRead' was not declared in this scope
/home/spuzzum/arduino-0018/libraries/Button/Button.cpp: In member function "˜bool Button::stateChanged()':
/home/spuzzum/arduino-0018/libraries/Button/Button.cpp:168: error: "˜bitRead' was not declared in this scope
sketch_dec07a:85: error: "˜PULLDOWN' was not declared in this scope
sketch_dec07a:86: error: "˜PULLDOWN' was not declared in this scope
sketch_dec07a:87: error: "˜PULLDOWN' was not declared in this scope
sketch_dec07a:88: error: "˜PULLDOWN' was not declared in this scope
I can't tell what you're missing but it does look like a library issue. I would run a "hello world" sketch against each library in turn and just see if they compile.
error: "˜PULLDOWN' was not declared in this scope
error: "˜BUTTON_PULLDOWN' was not declared in this scope
#include "/home/spuzzum/arduino-0018/hardware/arduino/cores/arduino/wiring.h"
// create the buttons
Button menu = Button(12,BUTTON_PULLDOWN);
Button select = Button(13,BUTTON_PULLDOWN);
Button plus = Button(14,BUTTON_PULLDOWN);
Button minus = Button(15,BUTTON_PULLDOWN);
Binary sketch size: 16208 bytes (of a 30720 byte maximum)
There is only one totally "free" pin on the AVR. In the 1.0 hardware I broke it out to a header pin next to the PWM headers. You could use that for a one wire network to read temps from a DS18B20.
You guys are thinking way too complicated for what he's trying to achieve.
Set up the free pin as a one-wire port. You now have one-wire, I2C, and serial available. Put a DS18B20 on the one-wire port and use it to sense temperature. Find a dedicated fan controller IC (or a generic PWM generator) that can work on one-wire or I2C and use that to control the fan. I don't think you need (or want) to switch AVRs or slave a second just to accomplish this specific goal.
If you DID want to break out a second AVR, you could just use another Typhon board and only populate the portions you need (i.e. you'd leave the RTC, buttons, and LCD header off.)
/*
The circuit:
* LCD RS pin to analog pin A1
* LCD Enable pin to analog pin A2
* LCD D4 pin to analog pin A3
* LCD D5 pin to digital pin 12
* LCD D6 pin to digital pin 8
* LCD D7 pin to digital pin 7
* LCD BL pin to digital pin 10 <-- not connected
* KEY pin to analog pin A0
*/
#include <LiquidCrystal.h>
LiquidCrystal lcd(15, 16, 17, 12, 8, 7);
char msgs[5][16] = {"Right Key OK ",
"Up Key OK ",
"Down Key OK ",
"Left Key OK ",
"Select Key OK" };
int adc_key_val[5] ={50, 200, 400, 600, 800 };
int NUM_KEYS = 5;
int adc_key_in;
int key=-1;
int oldkey=-1;
void setup()
{
pinMode(A1, OUTPUT); // analog 1 to digital 15
digitalWrite(A1, HIGH);
pinMode(A2, OUTPUT); // analog 2 to digital 16
digitalWrite(A2, HIGH);
pinMode(A3, OUTPUT); // analog 3 to digital 17
digitalWrite(A3, HIGH);
pinMode(A4, OUTPUT); // analog 4 to digital 18
digitalWrite(A4, HIGH);
lcd.clear();
lcd.begin(16, 2);
lcd.setCursor(0,0);
lcd.print("ADC key testing");
}
void loop()
{
adc_key_in = analogRead(0); // read the value from the sensor
key = get_key(adc_key_in); // convert into key press
if (key != oldkey) // if keypress is detected
{
delay(50); // wait for debounce time
adc_key_in = analogRead(0); // read the value from the sensor
key = get_key(adc_key_in); // convert into key press
if (key != oldkey)
{
lcd.setCursor(0, 1);
oldkey = key;
if (key >=0){
lcd.print(msgs[key]);
}
}
}
delay(100);
}
// Convert ADC value to key number
int get_key(unsigned int input)
{
int k;
for (k = 0; k < NUM_KEYS; k++)
{
if (input < adc_key_val[k])
{
return k;
}
}
if (k >= NUM_KEYS)k = -1; // No valid key pressed
return k;
}
http://www.nuelectronics.com/estore/index.php?main_page=project_lcd
http://www.dfrobot.com/wiki/index.php?title=Arduino_LCD_KeyPad_Shield_(SKU:_DFR0009)
Yes, the pre-1.0 version of the hardware was released without an NC clause on the license. No one participating in this thread has any involvement with that particular vendor and this thread is not intended to support or promote the version that they commercially sell (I did not know they were selling it until after it appeared on their web store). The original intent of this project was to get people to pull out their soldering irons and build something useful themselves.