|
12/07/2011, 11:57 AM | #826 | |
Registered Member
Join Date: Feb 2011
Posts: 70
|
Quote:
I have a TC1604A-01 display, and it uses the SPLC780D1 controller. Although it works fine in parallel mode and LiquidCrystal.. the 3rd and 4th lines start at 5th column.. unless address is stated at (-4,2) or (-4,3). It's "HD44780 compatible".. but it also doesn't work with the i2clcd backpack.. garbled text. Will be getting an actual HD44780 display from AdaFruit instead. But "trying" to play along with this project, and I'm getting errors.. thinking library issues... It originally said no Wiring.h. Googling, someone suggested copying the Wiring.h from the arduino/hardware/cores directory.. so I copied the file from there to the Button library directory. Now... Code:
/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 Using a more recent version of arduino.. arduino-0023 (linux) gives.. Code:
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 So sticking with arduino-0018... I have the Button and EEPROMVar libraries installed ok.. would error on those otherwise. Are you guys using a modified Button library? I grabbed the one from the link in the typhon script.. is there something else I'm missing? |
|
12/07/2011, 12:13 PM | #827 |
Team RC Member
Join Date: Sep 2003
Location: NY
Posts: 17,749
|
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.
__________________
Inconveniencing marine life since 1992 "It is my personal belief that reef aquaria should be thriving communities of biodiversity, representative of their wild counterparts, and not merely collections of pretty specimens growing on tidy clean rock shelves covered in purple coralline algae." (Eric Borneman) |
12/07/2011, 12:52 PM | #828 | |
Registered Member
Join Date: Feb 2011
Posts: 70
|
Quote:
ok.. feeling like a noob :P Seems I "didn't" have EEPROMVar in my arduino-0018 library directory.. only in my arduino-0023 directory... doh! Added to the 0018 directory, now it's just 1 error... Code:
error: ‘PULLDOWN’ was not declared in this scope Code:
error: ‘BUTTON_PULLDOWN’ was not declared in this scope That wasn't it. Did I put Wiring.h in the right place? I'm guessing it would error on that if it was though. And LiquidCrystal works fine... |
|
12/07/2011, 01:16 PM | #829 |
Registered Member
Join Date: Feb 2011
Posts: 70
|
ALAS!!!
A few issues... the script calls "Wiring.h" but it's actually called "wiring.h". Changed in the script. I also directed the Button.cpp to the arduino cores directory... Code:
#include "/home/spuzzum/arduino-0018/hardware/arduino/cores/arduino/wiring.h" Then it gave the "PULLDOWN" error again.. changed to "BUTTON_PULLDOWN"... Code:
// 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); Success!! Code:
Binary sketch size: 16208 bytes (of a 30720 byte maximum) Now I can play.............. |
12/07/2011, 01:54 PM | #830 |
Registered Member
Join Date: Sep 2004
Posts: 55
|
tweeking the sketch
Hey all,
I want to alter the sketch so that the "On" and "%" overrides relate to the channel's MAX settings rather than full power. I think the following modification should work, but would appreciate it if more experienced eyes would confirm: } I'd also like a add an additional override state of "actinic only" but haven't dug into what that might entail. Is it feasible to have a very short ramp up/down (1 or 2 seconds) between these override states? This would give the controller a more polished feel, and help avoid startling the fish. I have a feeling it may be complicated to implement. Thanks, Mickey |
12/07/2011, 01:57 PM | #831 |
Registered Member
Join Date: Feb 2011
Posts: 70
|
Happy Happy Happy, Joy Joy Joy...
Thanks DWZM.. greatly appreciated. May Santa spoil you this year........ |
12/07/2011, 02:51 PM | #832 | |
Registered Member
Join Date: Aug 2008
Posts: 29
|
Quote:
One pin free is analog-in and it can only use to measure temperature with DS18B20. if we use a DS18B20 to operate the fans we want to port digital I\O with relais or a PWM, but this is not available! alternative solution is to change AVR ATMEGA328 with a 1280 or 2560. must also change the design of the board, while the sketch remains the same, changing only the name at the pin. is that correct? |
|
12/07/2011, 03:30 PM | #833 |
Registered Member
Join Date: Feb 2011
Posts: 70
|
You could also slave another 328 for more pins.. I've seen articles on instructables showing how called "Core2Duino". Can link as many as you can code for.. within reason.
|
12/07/2011, 04:22 PM | #834 |
Registered Member
Join Date: Feb 2011
Posts: 70
|
There's also an atmega2560 breakout board... $25
http://jkdevices.com/index.php?route...&product_id=49 Or there seems to be pcb files here.. http://code.google.com/p/gruvin9x/so...ble).URL?r=536 |
12/08/2011, 07:41 AM | #835 |
Team RC Member
Join Date: Sep 2003
Location: NY
Posts: 17,749
|
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.)
__________________
Inconveniencing marine life since 1992 "It is my personal belief that reef aquaria should be thriving communities of biodiversity, representative of their wild counterparts, and not merely collections of pretty specimens growing on tidy clean rock shelves covered in purple coralline algae." (Eric Borneman) |
12/08/2011, 11:38 AM | #836 | |
Registered Member
Join Date: Feb 2011
Posts: 70
|
Quote:
True.. more work than benefit in the long run. But if you wanted to free up 3 pins right away... convert the script for an ADC button pad that only uses 1 line for "all" buttons... Code:
/* 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 Code:
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) |
|
12/08/2011, 12:40 PM | #837 |
Registered Member
Join Date: Feb 2011
Posts: 70
|
Someone's "selling" your Typhon??
http://www.thereefuge.com/threads/ar...d-answers.745/ Typhon LED Controller Kit: http://www.boostled.com/collections/...controller-kit |
12/08/2011, 12:47 PM | #838 |
Team RC Member
Join Date: Sep 2003
Location: NY
Posts: 17,749
|
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.
__________________
Inconveniencing marine life since 1992 "It is my personal belief that reef aquaria should be thriving communities of biodiversity, representative of their wild counterparts, and not merely collections of pretty specimens growing on tidy clean rock shelves covered in purple coralline algae." (Eric Borneman) |
12/08/2011, 01:16 PM | #839 |
Registered Member
Join Date: Aug 2009
Location: Northern VA
Posts: 4,618
|
Can the project be re-released/updated with the clause? If not perhaps we should start a new thread (and oh what a pain - find a new name). Is it worth it?
__________________
Click my home page for Thread Summaries Current Tank Info: 75 gallon lps and fish |
12/08/2011, 02:05 PM | #840 | |
Registered Member
Join Date: Feb 2011
Posts: 70
|
Quote:
That sucks... I'm a die hard DIY'er, and I know the effort you put into this.. so seeing that was kind of an insult to the DIY community. |
|
12/08/2011, 02:20 PM | #841 |
Team RC Member
Join Date: Sep 2003
Location: NY
Posts: 17,749
|
The 1.0 version of the hardware is released already with an NC clause, which means it cannot be sold commercially (without explicit permission from the license holder, i.e. me). I plan on using the NC clause on future releases as well, if there are any.
__________________
Inconveniencing marine life since 1992 "It is my personal belief that reef aquaria should be thriving communities of biodiversity, representative of their wild counterparts, and not merely collections of pretty specimens growing on tidy clean rock shelves covered in purple coralline algae." (Eric Borneman) |
12/08/2011, 02:37 PM | #842 | |
Registered Member
Join Date: Aug 2008
Posts: 29
|
Quote:
So must also change the name in DWZM's controller |
|
12/08/2011, 02:44 PM | #843 |
Team RC Member
Join Date: Sep 2003
Location: NY
Posts: 17,749
|
Hey, it's not "my" controller, it's the DIY community's controller.
__________________
Inconveniencing marine life since 1992 "It is my personal belief that reef aquaria should be thriving communities of biodiversity, representative of their wild counterparts, and not merely collections of pretty specimens growing on tidy clean rock shelves covered in purple coralline algae." (Eric Borneman) |
12/08/2011, 02:48 PM | #844 |
Registered Member
Join Date: Aug 2009
Location: Northern VA
Posts: 4,618
|
Maybe that is what is should be called "My Controller" since everyone's is slightly different.
__________________
Click my home page for Thread Summaries Current Tank Info: 75 gallon lps and fish |
12/09/2011, 04:34 PM | #845 |
Registered Member
Join Date: Aug 2008
Posts: 29
|
Spuzzum, DWZM, good!!!
we can use i2c for all buttons and liberate the digital pin 18-19, change the pin 11PWM, currently connected to the display, on the digital pin 18. so we can connect the fan to pin PWM11 and DS18B20 connected on 26-pin analog Last edited by Baghyyy; 12/09/2011 at 04:42 PM. |
12/09/2011, 05:26 PM | #846 |
Registered Member
Join Date: Feb 2011
Posts: 70
|
I just played with the MCP23008 i2clcd circuit DWZM has in his Hydra schematic.. my lcd now works on i2c! Pinout's different than the one from adafruit..
http://www.adafruit.com/products/292 I then came across another design.. few pins different again, but it also works with the ADC keypad.. the type I posted above. Amazingly.. it works too.. including the "joystick" as the manufacturer calls it :P. Deuligne Schematic LCDI2C4Bit Adapter Schematic - Deuligne connections are black and in brackets My DIP Switch Settings: Code:
LCDI2C4Bit: 1, 2, 4 1 - on = RW disabled 2 - on = RS 3 - off 4 - on = E 5 - off 6 - off Deuligne: 3, 5, 6 1 - off = RW disabled 2 - off 3 - on = RS 4 - off 5 - on = E 6 - on = RW enabled LCDI2C4Bit Mode Successful Deuligne Mode Successful |
12/09/2011, 05:29 PM | #847 |
Registered Member
Join Date: Feb 2011
Posts: 70
|
I then tested the LCDI2C "Hello World" script by modifying for use with Deuligne..
Code:
//LCDI2C modified for Deuligne: // example use of LCDI2C library with the web4robot.com i2C lcd display #include LCDI2C Trial Successful I then tried the "joystick" test for Deuligne.. same as the ADC Keypad I made earlier.. the one that uses resistors to sense which key is which... Joystick Test Successful The keypad settings are actually more responsive than the ones in the script from Nuelectronics for the keypad schematic I built. I love when things I make actually work . Yeah.. had some issues.. and even screwed up "slightly" when wiring the DIP.. should've controlled RW pin connection with positions 1 and 2, instead of 1 and 6. Didn't realize I needed another connection until the input pins on the DIP had already been jumped for each line needing 2 output options. Oh well.. it's only a tester. In fact.. it's on a board salvaged from an old project I don't use anymore.. cheapskate, eh? |
12/09/2011, 05:31 PM | #848 |
Registered Member
Join Date: Feb 2011
Posts: 70
|
Here's the files for the Deuligne.. including the Arduino library...
http://tronixstuff.wordpress.com/201...rduino-shield/ http://wiki.ultimaker.com/Deuligne_LCD_interface http://shop.snootlab.com/lang-en/sno...-deuligne.html <--- download tab has schematics, board files, and user guide https://github.com/Snootlab/Deuligne <--- Deuligne library for Arduino Sorry.. had to split it up.. couldn't post all in one. Should be something we can work with though.. very adaptable. And look at all the pins it just freed up . |
12/10/2011, 12:44 AM | #849 |
Registered Member
Join Date: Feb 2011
Posts: 70
|
So I tried the Deuligne version in the Typhon script, but used DWZM's buttons instead of the ADC Key buttons... and it works . Just freed up 4 pins.. and it only took a $5 modification, and very minor changes to the script.. basically just calling Deuligne.h in place of LiquidCrystal.h, replacing the LiquidCrystal(x,x,x,x,x,x,x,x); LCD pin declaraton, and removing the (16,2) when the lcd is initiated.. blank screen otherwise .
|
12/10/2011, 12:54 AM | #850 |
Registered Member
Join Date: Feb 2011
Posts: 70
|
Script with edits... total of 3 lines changed.
Code:
/* // Typhon firmware // v0.3 alpha 2011-16-11 // N. Enders, R. Ensminger // // This sketch provides firmware for the Typhon LED controller. // It provides a structure to fade 4 independent channels of LED lighting // on and off each day, to simulate sunrise and sunset. // // Current work in progress: // - store all LED variables in EEPROM so they are not reset by a loss of power // - allow for signals to be inverted for buckpucks or other drivers that consider 0 to be "on" // // Future developments may include: // - moon phase simulation // - storm simulation // - support for plugin hardware modules for temperature, pH, relay control, etc. // // Sketch developed in Arduino-22 // Requires LiquidCrystal, Wire, EEPROM, EEPROMVar, and Button libraries. // Button is available here: http://www.arduino.cc/playground/Code/Button // EEPROMVar is available here: http://www.arduino.cc/playground/uploads/Profiles/EEPROMVar_01.zip */ // include the libraries: #include "Deuligne.h" ////<------------- changed #include "Wire.h" #include "Button.h" #include "EEPROM.h" #include "EEPROMVar.h" /**** Define Variables & Constants ****/ /****************** /* The circuit: * LCD RS pin to digital pin 8 * LCD Enable pin to digital pin 7 * LCD D4 pin to digital pin 5 * LCD D5 pin to digital pin 4 * LCD D6 pin to digital pin 16 (A2) * LCD D7 pin to digital pin 2 * LCD R/W pin to ground */ //********************/ // set the RTC's I2C address #define DS1307_I2C_ADDRESS 0x68 // create the LCD Deuligne lcd; //// <------------- changed // set up backlight int bkl = 6; // backlight pin byte bklIdle = 10; // PWM value for backlight at idle byte bklOn = 70; // PWM value for backlight when on int bklDelay = 10000; // ms for the backlight to idle before turning off unsigned long bklTime = 0; // counter since backlight turned on // create the menu counter int menuCount = 1; int menuSelect = 0; //create the plus and minus navigation delay counter with its initial maximum of 250. byte btnMaxDelay = 200; byte btnMinDelay = 25; byte btnMaxIteration = 5; byte btnCurrIteration; //create manual override variables boolean override = false; byte overmenu = 0; int overpercent = 0; // create the buttons Button menu = Button(14,BUTTON_PULLDOWN); Button select = Button(15,BUTTON_PULLDOWN); Button plus = Button(16,BUTTON_PULLDOWN); Button minus = Button(17,BUTTON_PULLDOWN); // LED variables. These control the behavior of lighting. Change these to customize behavoir int minCounter = 0; // counter that resets at midnight. int oldMinCounter = 0; // counter that resets at midnight. int oneLed = 9; // pin for channel 1 int twoLed = 10; // pin for channel 2 int threeLed = 11; // pin for channel 3 int fourLed = 3; // pin for channel 4 int oneVal = 0; // current value for channel 1 int twoVal = 0; // current value for channel 2 int threeVal = 0; // current value for channel 3 int fourVal = 0; // current value for channel 4 // Variables making use of EEPROM memory: EEPROMVar Now just needs a temp sensor portion..... |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cheap Moonlight | ticklesworth | New to the Hobby | 3 | 04/04/2010 04:09 PM |
Cheap Moonlight | ticklesworth | Do It Yourself | 0 | 04/03/2010 08:52 AM |
Arduino base controller - power pack ONLY TODAY | MaLi | Do It Yourself | 0 | 03/07/2010 05:56 AM |
Sumps 101: Cheap, simple and effective for small tanks | cody6766 | Central Oklahoma Marine Aquarium Society | 8 | 01/06/2009 10:57 AM |