|
01/29/2012, 06:48 PM | #926 |
Registered Member
Join Date: Nov 2011
Location: Austin, Texas
Posts: 21
|
Adapting Typhon code
Over the last few months I've been building an Arduino controller for my tank. I would like to have these features when its all done: 2 LED main channels, 1 moonlight channel, Temp, pH, Heater, ATS and the last phase would add the Arduino ethernet shield.
I tried to adapted the original Typhon code and tried using Spuzzum's ADC code. I can't figure out how to alter the typhon code to work with my hardware. Using the i2c saves me pins but completely changes the way clicks are monitored. The problem is passing the key movement to the old code. I've tried to adapt the code but its way above my programming skills. Here is what I have... Hardware Modern Device's Bare-bones Freeduino Adafruit DS1307 RTC using i2c Modern Device's USB BUB II Adafruit 20x4 Standard HD44780 LCD Adafruit i2c LCD backpack 5 way joystick switch that uses 5 resistors (a.k.a. ADC joystick) Joel's Controller current PinOuts * ------------------------------ * 0 {Heater} .................. A0 Keypad (5 switch Joystick) * 1 {ATS} ..................... A1 * 2 ............................... A2 * 3 {MOON LED} PWM ..... A3 * 4 Ethernet/SDcard ....... A4 i2c DAT (LCD&RTC) * 5 LED 1 PWM .............. A5 i2c CLK (LCD&RTC) * 6 LED 2 PWM * 7 * 8 {TEMP} * 9 {LED} PWM [BACKLTH not used with current LCD] * 10 Ethernet/SDcard * 11 Ethernet/SDcard * 12 Ethernet/SDcard * 13 Ethernet/SDcard * ------------------------------- Items in {These} brackets indicates possible location for feature Last edited by joelatx; 01/29/2012 at 06:59 PM. |
01/30/2012, 10:45 AM | #927 | |
Team RC Member
Join Date: Sep 2003
Location: NY
Posts: 17,749
|
Quote:
You mentioned putting it on the App store for free, which is generous. As a friendly reminder, since moving in this direction might bring some new visibility to the Typhon controller, the hardware is currently licensed under CC 3.0 by-sa-nc, which means it can't be sold commercially, you are free to use it for personal use, and any work done with the Typhon as it's core MUST be attributed to this project and released under the same license (i.e. you can't base something on the current Typhon hardware and then sell it). joelatx, Have you gotten the individual components working on their own? i.e. plug ONE bit of hardware into the freeduino, and load a sketch that ONLY tests that piece? That's always my starting point when adapting hardware and mixing different sources for sub-components.
__________________
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) |
|
01/30/2012, 10:58 AM | #928 |
Registered Member.
Join Date: Oct 2011
Posts: 28
|
I've been playing with it for the past few days and finally have the BT module pairing to the cell. I just need to work on getting the buttons to send the serial info for the buttons and add a % slider to it. I've managed to get the test serial coding to work using a BT terminal for the cell to work to turn lights to Timer,All Max and All Min.....not sure how to do the % part yet. But here is a pic of the beginnings of the app. I still need to add another page for the about section to include the contributor names and a button for a link to this thread.
|
01/30/2012, 11:17 AM | #929 |
Registered Member
Join Date: Nov 2011
Location: Austin, Texas
Posts: 21
|
Yes all the individual parts are working, (excluding the ethernet, that's later) I have been able to get Spuzzum's ADC test code to work, and I'm able to add the clock to that code and it displays. I can load the typhon code, and it displays the normal menu (but of course the buttons don't work.)
The Typhon code uses a "CheckButtonAction" or some other method to catch the key presses on individual pins. The ADC keyboard uses the i2c bus and I'm having trouble sending (catching) something the old code can understand. I can post code samples once I get home, if that will help. Last edited by joelatx; 01/30/2012 at 12:11 PM. |
01/30/2012, 11:56 AM | #930 |
Team RC Member
Join Date: Sep 2003
Location: NY
Posts: 17,749
|
Yeah, code samples would help. Maybe Spizzum will come along and offer some guidance. This is one thing I haven't yet done on this 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) |
01/30/2012, 12:07 PM | #931 |
Registered Member
Join Date: Aug 2001
Location: California
Posts: 2,259
|
Quick question. Is the Typhon board more or less to control LED's or has it been updated or modified to do a bit more such as report water temp? Or should I be looking at the other project in the DIY section?
I have two bio-cubes which support dimmable LED's (one using Steve's and the other using Rapid's) but wanted to report temp as well. Controlling pumps to feed would be grand as would a data logger but honestly I have to keep costs down Sorry if this has been asked before. Oh - are the build of material lists out there on google still current or up to date?
__________________
-saf1 Current Tank Info: 210 gallon mixed reef |
01/30/2012, 12:10 PM | #932 | |
Registered Member
Join Date: Jul 2011
Posts: 118
|
saltydogaqua,
What kind of shield are you going to use for communication? shark boy Quote:
|
|
01/30/2012, 12:12 PM | #933 |
Team RC Member
Join Date: Sep 2003
Location: NY
Posts: 17,749
|
The BOM on google is more or less up to date. I just used it to order parts last week and everything from Mouser was in stock.
The Typhon was really designed to control LEDs, with the potential for expansion. There's nothing in the core project to do what you're describing out of the box, but the potential is definitely there. A popular way to get temps is to use one wire temp sensors (DS1820). A popular way to read switch states and turn pumps on and off would be to use an I2C I/O berakout board (see the one that's a part of the Hydra project) with a relay board. Speaking of the Hydra, it was really designed from the ground up to be a whole-tank controller, so it has some things out of the box that the Typhon does not have. But, of course, they're both Arduino-based, so they basically have the same potential functionality. It's really a matter of what comes out of the box as part of the design vs. what you have to build yourself.
__________________
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) |
01/30/2012, 12:24 PM | #934 |
Registered Member.
Join Date: Oct 2011
Posts: 28
|
|
01/30/2012, 06:41 PM | #935 |
Registered Member
Join Date: Nov 2011
Location: Austin, Texas
Posts: 21
|
Code I've been using
OK here is the code with working buttons with a clock on the display.
Code:
/* * Spuzzum's ADC buttons * TimeRTC.pde * example code illustrating Time library with Real Time Clock. * */ //#include "Time.h" #include "Wire.h" #include "RTClib.h" // #include |
01/30/2012, 06:49 PM | #936 |
Registered Member
Join Date: Nov 2011
Location: Austin, Texas
Posts: 21
|
This one also works, it uses fewer lines of code for the buttons. Don't know if it would be easier to adapt.
Code:
/* * Building Control * ADC and Clock - version 3 * Can't remember where this came from */ #include "Wire.h" #include "RTClib.h" // #include |
01/31/2012, 04:49 AM | #937 | ||
Registered Member
Join Date: Jan 2009
Location: South West London, UK
Posts: 35
|
Quote:
Quote:
|
||
01/31/2012, 05:14 AM | #938 |
Registered Member
Join Date: Aug 2008
Posts: 29
|
To operate the buttons on a single wire analog pin must use the library
If you want me to publish the modified code I connected all the pins A0 and everything works successfully |
01/31/2012, 07:56 AM | #939 | |
Registered Member
Join Date: Jul 2011
Posts: 118
|
Quote:
I've tried Spuzzem's code and it won't compile for me. I keep getting Button_Pulldown was declared in this scope errors. I am not any good at writting code. The learning curve is killing me. |
|
01/31/2012, 09:30 AM | #940 | |
Team RC Member
Join Date: Sep 2003
Location: NY
Posts: 17,749
|
Quote:
__________________
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) |
|
01/31/2012, 11:22 AM | #941 |
Registered Member.
Join Date: Oct 2011
Posts: 28
|
This is my first app project so it's a learning curve for me honestly. I finally managed to get the buttons for Normal,All Max and All Min working. Reason I went with the BT app is because we can plug it in after the typhon sketch is uploaded. Ethernet and Wifi wouldn't work as they use different pin already in use. I could probably try something for the Hydra Project but I haven't really looked at that sketch nor do I have a working unit to test it out on. Google is my friend....yeah right...lol. It took 4 days of searching and trying different things til I got the buttons working...But i still need to add a settings page for the LEDs and one to set the time so it'll be a while before this project is complete.But if your just looking for an app that for the typhon that you can turn on all the lights and back to normal mode it's complete and I can change the layout of the buttons just for that for now and post the apk file for the android.
The main goal for this was to get my feet wet in making an app. For this project it's to get the current values of each channel displayed, all the buttons and the slider to set the %, as well as being able to set the on/off times,Max/Min values and last but not least setting the time and date. |
01/31/2012, 11:32 AM | #942 |
Registered Member.
Join Date: Oct 2011
Posts: 28
|
Here is the coding that needs to be added to the sketch for use with the BT Module...
Code:
void serialCommands() { int command = 0; // This is the command char, in ascii form, sent from the serial port //int i; //byte test; if (Serial.available()) { // Look for char in serial que and process if found command = Serial.read(); if (command == 65) { // "A" = Timer overSelect = 0; } if (command == 66) { // "B" = All Max overSelect = 1; } if (command == 67) { // "C" = All Min overSelect = 2; } } command = 0; // reset command //delay(100); } Code:
serialCommands(); |
01/31/2012, 12:20 PM | #943 |
Registered Member
Join Date: Aug 2008
Posts: 29
|
So the first thing you need to upload this sketch.
then press each button and note the value shown on the display. Code:
#include Attached is the all code modified, you change the values you wrote before, only where there are "arrows change" example: Code:
fourButtons.setBounce(10); fourButtons.setErrorWindow(26); fourButtons.setDelay(10); fourButtons.setRefOff(60); fourButtons.setRef(MenuButton,838); // <-----------change value fourButtons.setRef(SelectButton,695); // <-----------change value fourButtons.setRef(PlusButton,511); // <-----------change value fourButtons.setRef(MinusButton,177); // <-----------change value Buttons.rar |
01/31/2012, 02:09 PM | #944 |
Registered Member
Join Date: Apr 2010
Location: Ann Arbor, Michigan
Posts: 7
|
Ok I've been reading through posts back to 2010. FanFreakingTastic! The early posts had me very excited, as I read on, and more experts started weighing in I became a little wary. I have visited the site "http://code.google.com/p/typhon-reef/downloads/list" but was not able to find anything, code, supply list, instructions, manual. I would really like to jump in here, I'm finishing up my 2 LED projects using the Mean Well ELN-60-48D. Can some one point me to the details?
|
01/31/2012, 03:21 PM | #945 |
Team RC Member
Join Date: Sep 2003
Location: NY
Posts: 17,749
|
You're just in the wrong spot on that site. The files are here:
http://code.google.com/p/typhon-reef...e/#svn%2Ftrunk Expand the "hardware" or "software" trees on the left and you'll see everything you need. If you have questions, please ask.
__________________
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) |
02/01/2012, 12:02 PM | #946 |
Registered Member
Join Date: Apr 2010
Location: Ann Arbor, Michigan
Posts: 7
|
Still no luck...
I tried again with both Chrome and IE. I get in and can poke about but non of the files are a recognized format - except one XLS. But when I open it all I get is basically what's in the attached file.
|
02/01/2012, 12:04 PM | #947 |
Team RC Member
Join Date: Sep 2003
Location: NY
Posts: 17,749
|
When you get to that screen, click "view raw file" and save the result to your hard drive.
The BOM is in excel format. The rest of the files are EAGLE CAD files - you will need to download and install EAGLE or another program that can read EAGLE files to view them. There is a freeware version of EAGLE: http://www.cadsoftusa.com/downloads/?language=en
__________________
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) |
02/01/2012, 12:52 PM | #948 |
Registered Member
Join Date: Apr 2010
Location: Ann Arbor, Michigan
Posts: 7
|
BoostedLED
I just found a source of pre-built Typhon units from http://www.boostled.com/products/typ...controller-kit (is this on the up and up?) Now I was looking forward to the project but for $50 I could do two. I still would love to get a copy of the materials list and the instructions.
|
02/01/2012, 01:39 PM | #949 |
Registered Member
Join Date: Aug 2009
Location: Northern VA
Posts: 4,618
|
It is a slightly older version. Don't know all the changes to the latest.
__________________
Click my home page for Thread Summaries Current Tank Info: 75 gallon lps and fish |
02/01/2012, 01:42 PM | #950 |
Registered Member.
Join Date: Oct 2011
Posts: 28
|
Only difference is there is an input to A3 on the v1.0
|
Thread Tools | |
|
|
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 |