Show Posts
Pages: [1] 2 3 4
1  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Mega + W5100 w/MicroSD ... cant even get it started! on: April 08, 2012, 11:32:06 am
I shall definately have a look at it next,

out of interest if there any threads that you know of which would be useful for SMTP or similar by all means post a link etc.

Now that Ive got the SD card side of the program working im just intergrating that in and shall have look at the "networking" side of it once I've got the SD card linked.

Luke
2  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Mega + W5100 w/MicroSD ... cant even get it started! on: April 07, 2012, 03:48:29 pm
Huzzah!

Finally managed to get somewhere with the shield!

the problem lay in where and how I was allocating the Wiznet5100 chip and the SD,

because the W5100 and SD card share the SPI bus, only one can be active at a time.I needed to explicitly deselect it. To do this with the SD card, I set pin 4 as an output. For the W5100, I then set digital pin 10 as a high output

using the default SD example
Code:

#include <SD.h>

File myFile;

void setup()
{
  Serial.begin(9600);
  Serial.print("Initializing SD card...");
  // On the Ethernet Shield, CS is pin 4. It's set as an output by default.
  // Note that even if it's not used as the CS pin, the hardware SS pin
  // (10 on most Arduino boards, 53 on the Mega) must be left as an output
  // or the SD library functions will not work.

  pinMode(10, OUTPUT);//sets w5100chip
  digitalWrite(10,HIGH); // disables w5100
  pinMode(4, OUTPUT); // sets SD chip
  //digitalWrite(4,HIGH);//disables SD chip

  if (!SD.begin(4)) {
    Serial.println("initialization failed!");
    return;
  }
  Serial.println("initialization done.");

  if (SD.exists("example.txt")) {
    Serial.println("example.txt exists.");
  }
  else {
    Serial.println("example.txt doesn't exist.");
  }

  // open a new file and immediately close it:
  Serial.println("Creating example.txt...");
  myFile = SD.open("example.txt", FILE_WRITE);
  myFile.close();

  // Check to see if the file exists:
  if (SD.exists("example.txt")) {
    Serial.println("example.txt exists.");
  }
  else {
    Serial.println("example.txt doesn't exist."); 
  }

  // delete the file:
  Serial.println("Removing example.txt...");
  SD.remove("example.txt");

  if (SD.exists("example.txt")){
    Serial.println("example.txt exists.");
  }
  else {
    Serial.println("example.txt doesn't exist."); 
  }
}

void loop()
{
  // nothing happens after setup finishes.
}




Least thats a step in the right direction,

Im just going to work on the networking side of it, Ultimately Id like to use it to send an email (via telnet im assuming) (and it worked with the 4GB SDHC card)

Luke ^^
3  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Mega + W5100 w/MicroSD ... cant even get it started! on: April 07, 2012, 03:35:46 pm
Thank you ZoomKat,

Ive read through that thread, its not the coding that the issue persay, in that it definately uploads, and it definately runs correctly it just cant "see" the SD card,

I've tried:

a new clean IDE
known working cards (4/8 Gb MicroSDHC cards, a 2 Gb MicroSD)

Unfortunately Im going to struggle getting a replacement shield if its busted as I have a tight deadline for my project (needs to be done in 1 month time due to commitments). So I hope it isnt the shield =/

Anyone think of anything obvious that i might have missed?

I currently have my arduino stacked directly to the Ethernet shield v5.0/W5100

Luke
4  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Mega + W5100 w/MicroSD ... cant even get it started! on: April 07, 2012, 02:32:00 pm
Ah thats interesting,
I couldnt find any documentation regarding maxium memory size but that could possibly fit, I've only used a 4Gb and an 8 GB card as its the only cards ive got to hand however I shall place an order for a smaller card.

edit: I've found a working 2 Gb microSD card but this has also failed when I tried your code below.

Shield busted? IDE(im using Arduino 0022)/arduino Core files playing up?

either way I might try and work in the network connection but I do need to sort this SD card problem out.
5  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Mega + W5100 w/MicroSD ... cant even get it started! on: April 07, 2012, 12:50:17 pm
Thank you SurferTim for the response.

Yes my unit has a 6 pin ICSP so that answers the first  question so thank you.

I've had a look at your code which you supplied unless i've missed something obvious Im still getting an error (infact its stopping at the SD card check not the Ethernet check).

Heres the code I tried:

Code:
#include <SD.h>
#include <SPI.h>
#include <Ethernet.h>

const int chipSelect = 4;
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192,168,1, 254 };

void setup()
{
  Serial.begin(9600);
   // just to be safe, I disable the w5100 SPI while starting the SD SPI
   // I had problems in restarting without this in my FTP code
   pinMode(53,OUTPUT); //location of the SS pin, 53 on the Mega, 10 on other
   digitalWrite(53,HIGH);
}

void loop()
{
   // start the SD card
   // this begin returns with the SD SPI disabled
   if(SD.begin(chipSelect) == 0)  Serial.println("SD fail");

// start the ethernet port
   // this begin returns with the w5100 SPI enabled
   Ethernet.begin(mac,ip);
   digitalWrite(10,HIGH);

}



The microSD card is a 4Gb SDHC card which is known to work so its not the card however it keeps bouncing back as a fail.

Ive also tried:

Code:
#include <SD.h>

File myFile;

void setup()
{
  Serial.begin(9600);
  Serial.print("Initializing SD card...");
  // On the Ethernet Shield, CS is pin 4. It's set as an output by default.
  // Note that even if it's not used as the CS pin, the hardware SS pin
  // (10 on most Arduino boards, 53 on the Mega) must be left as an output
  // or the SD library functions will not work.
   pinMode(53, OUTPUT);
   
  if (!SD.begin(4)) {
    Serial.println("initialization failed!");
    return;
  }
  Serial.println("initialization done.");
 
  // open the file. note that only one file can be open at a time,
  // so you have to close this one before opening another.
  myFile = SD.open("test.txt", FILE_WRITE);
 
  // if the file opened okay, write to it:
  if (myFile) {
    Serial.print("Writing to test.txt...");
    myFile.println("testing 1, 2, 3.");
// close the file:
    myFile.close();
    Serial.println("done.");
  } else {
    // if the file didn't open, print an error:
    Serial.println("error opening test.txt");
  }
 
  // re-open the file for reading:
  myFile = SD.open("test.txt");
  if (myFile) {
    Serial.println("test.txt:");
   
    // read from the file until there's nothing else in it:
    while (myFile.available()) {
    Serial.write(myFile.read());
    }
    // close the file:
    myFile.close();
  } else {
  // if the file didn't open, print an error:
    Serial.println("error opening test.txt");
  }
}

void loop()
{
// nothing happens after setup
}

That also failed.. I've tried it with my other MicroSD card which is an 8GB SDHC card.


Hmm (I know this is slighly siding away from Networking, however it uses the W5100 shield and I have plenty of questions to do with network communications as well!)

Any Ideas folks?

Best regards
Luke
6  Using Arduino / Networking, Protocols, and Devices / Arduino Mega + W5100 w/MicroSD ... cant even get it started! on: April 07, 2012, 10:23:27 am
Hello Folks,

after literally hours of trying various methods of getting my W5100 board to connect to my Mega I've conceded defeat and Im asking for help.

for my project im building essentially a datalogging device, Although I've made various LED/LCD/probe projects I've yet to use any internet based communication.

Im now trying to work on both sides of this project (mass storage and Ethernet connection) but Im getting nowhere.
 
I've tried manually remapping the pins of the w5100 to the mega as recommended here:

http://mcukits.com/2009/04/06/arduino-ethernet-shield-mega-hack/

but that didnt work, other documentation online says that with the newer boards there is actually no need to hack the hardware or SPI software,

(my board says MEGA Compatible).

So my first question is I cant tell If A) I need to change any hardware or software or if i can just stack it as a shield and run the code.

I tried without remapping the pins tried writing the Mac address and my network IP address but I got a connection fail im at a friends house this weekend but im using port 80/81 which are usually default open if I remember correctly.

On my W5100 board the sticker says "HanRun" HR911105A 11/16 (however a quick google says thats just the RJ45 jack part number etc) and was purchased from :

http://www.ebay.co.uk/itm/Ethernet-Shield-05-W5100-For-Arduino-UNO-MEGA-1280-2560-/130646984479?pt=LH_DefaultDomain_0&hash=item1e6b2ac71f

Secondly for the SD memory card side (I know its the wrong subforum) however Im using a 4gb MicroSDHC card, I've yet to find any schematics to say I cant use a card larger than Xmb/gb or it must be an older microSD not a SDHC card.

if anyone could shed any light on this I would be eternally grateful.

Luke
7  Forum 2005-2010 (read only) / Interfacing / Re: Reef Pico LED intefacing, 3 watt LED's and RTC on: January 23, 2011, 04:59:03 pm
Well i've managed to wire up a basic 1602 LCD screen that 16 char by 2.
so im now just meshing the LCD screen and my LED code. I also want to write some code that uses some basic push buttons as input buttons, then i'll write my menu code.

Its kinda nice how quick some of this coding is coming back to me, plus had some fun decyfering the datasheet for this lcd, doing a bit of soldering etc.

Harle
8  Forum 2005-2010 (read only) / Interfacing / Re: Reef Pico LED intefacing, 3 watt LED's and RTC on: January 22, 2011, 01:36:18 pm
huzzzar!

i've managed to fix the majority of the code, infact most of that code above needed re-writing/ tweeking.

im just testing it a bit more then i'll start looking into intergrating an LCD and buttons.

once ive got the fade to work correctly (im sure its just some of my syntax) i'll post the latest code.



edited later:

Well here we are at the moment, i've managed to write the correct code which fades leds in and out at user defined times.

The next stage is to incroperate an LCD and buttons, so i can write code for a menu system that enables the user to set the Maximum led intensity values (fadeMaxWhite and fadeMaxBlue) and then write code that enables the user to define what time they would like the various lights to come on and off at.

Then from there id like to rig a Moonlight, with a 1 watt led maybe. or possibly play with LED matrix's for random weather patterns maybe.

Code:
//Marine Reef Pico Led lighting controller Version 1.03
//created by Harlequin 22-01-11.
//Based on various code librarys avalable on the public domain along with coding compiled by the author.

#include <WProgram.h>
#include <Wire.h>
#include <DS1307.h>

int whiteFadeOn = 0;
int whiteFadeOff = 0;
int blueFadeOn = 0;
int blueFadeOff = 0;

int whiteLedPin = 9; // White Led chain linked to Digital pin9
int blueLedPin = 10; // Blue Led chain linked to Digital pin10

int blueFadeValue = 0;
int whiteFadeValue = 0;

int userDefMaxWhite = 100; //0-100 user defines the max intensity of the leds
int userDefMaxBlue = 100; //0-100 user defines the max intensity of the leds
int fadeMaxWhite; //variable used when converthing userDefMaxWhite into a PWM value
int fadeMaxBlue; //variable used when converthing userDefMaxBlue into a PWM value

int hour;//variable used for the RTC timed event.
int minute;//variable used for the RTC timed event.

int counter = 0;//counter for PWN

void setup(){
  Serial.begin(9600); //not needed in end product
  rtcStart();
}

void loop(){
  debug(); //not needed in end product
  maxCalc();
  ledFade();
  rtcCatch();  
}

void ledFade(){  
  if(counter < 60){
    counter++;
  }
  else{
    
    if(whiteFadeOn == 1){
      if(whiteFadeValue <= fadeMaxWhite) {
        analogWrite(whiteLedPin, whiteFadeValue);      
        whiteFadeValue = whiteFadeValue+4; // 255/4 = 63.75 i.e. 0-100% takes 63.75 minutes roughly to complete if it takes 1 minutes to complete 1 cycle.
      }
    }

    if(blueFadeOn == 1){
      if(blueFadeValue <= fadeMaxBlue) {
        analogWrite(blueLedPin, blueFadeValue);      
        blueFadeValue = blueFadeValue+4;
     }
    }  
  
    if(blueFadeOff == 1){
      if(blueFadeValue >= 0) {
        analogWrite(blueLedPin, blueFadeValue);      
        blueFadeValue = blueFadeValue-4;
      }
    }
  
    if(whiteFadeOff == 1){
      if(whiteFadeValue >= 0) {
        analogWrite(whiteLedPin, whiteFadeValue);      
        whiteFadeValue = whiteFadeValue-4;
     }
   }
   counter =0;
}
}








void maxCalc(){
  fadeMaxWhite = userDefMaxWhite*2.55;//converts user defined percentage (0-100) into a PWM value (0-255)
  fadeMaxBlue = userDefMaxBlue*2.55;//converts user defined percentage (0-100) into a PWM value (0-255)
}

void rtcCatch(){
  hour = RTC.get(DS1307_HR,false);
  minute = RTC.get(DS1307_MIN,false);
  
  if((hour == 8)&&(minute == 0)){//sets for 08:00
    blueFadeOn = 1;  
  }
  
  if((hour ==8)&&(minute == 2)){//sets for 08:02
    whiteFadeOn = 1;  
  }

  if((hour ==15)&&(minute == 0)){//sets for 15:00
    whiteFadeOn = 0;  
    blueFadeOn = 0;
  }

  if((hour ==20)&&(minute == 0)){//sets for 20:00
    whiteFadeOff = 1;  
  }

  if((hour ==20)&&(minute == 30)){//sets for 20:30
    blueFadeOff = 1;  
  }

  if((hour ==3)&&(minute == 0)){
    whiteFadeOff = 0;
    blueFadeOff = 0;
    
  }  
}

void debug(){ //not needed in end product
  Serial.print(RTC.get(DS1307_HR,true)); Serial.print(":"); Serial.print(RTC.get(DS1307_MIN,false));Serial.print(":");Serial.print(RTC.get(DS1307_SEC,false));
  Serial.print("      Counter:");    
  Serial.print(counter);
  Serial.print("      ");
  Serial.print(RTC.get(DS1307_DATE,false));Serial.print("/"); Serial.print(RTC.get(DS1307_MTH,false));Serial.print("/");Serial.print(RTC.get(DS1307_YR,false));Serial.print(" "); Serial.print(RTC.get(DS1307_DOW,false));
  Serial.print(" Blue LED state:");Serial.print(blueFadeOn);Serial.print(blueFadeOff);Serial.print("   PWM Value:");Serial.print(blueFadeValue);
  Serial.print("      ");
  Serial.print("White LED state:");Serial.print(whiteFadeOn);Serial.print(whiteFadeOff);Serial.print("   PWM Value");Serial.print(whiteFadeValue);
  Serial.println();
  delay(1000);
}

void rtcStart(){
  RTC.stop();
  RTC.set(DS1307_SEC,01);        //set the seconds
  RTC.set(DS1307_MIN,59);     //set the minutes
  RTC.set(DS1307_HR,7);       //set the hours
  RTC.set(DS1307_DOW,6);       //set the day of the week
  RTC.set(DS1307_DATE,22);       //set the date
  RTC.set(DS1307_MTH,1);        //set the month
  RTC.set(DS1307_YR,11);         //set the year
  RTC.start();  
}
9  Forum 2005-2010 (read only) / Interfacing / Re: Reef Pico LED intefacing, 3 watt LED's and RTC on: January 22, 2011, 09:09:25 am
although i havent had a chance to test this code particullarly what do you guys think of the coding syntax/ideas etc the use of if loops, booleans etc

Code:
#include <WProgram.h>
#include <Wire.h>
#include <DS1307.h>

boolean whiteFadeOn = false;
boolean whiteFadeOff = false;
boolean blueFadeOn = false;
boolean blueFadeOff = false;
int whiteLedPin = 9;
int blueLedPin = 10;
int userDefMaxWhite = 100; //0-100 user defines the max intensity of the leds
int userDefMaxBlue =50; //0-100 user defines the max intensity of the leds
int fadeMaxWhite;
int fadeMaxBlue;

void setup(){
 // rtcStart();
}

void loop(){
  maxCalc();
  ledFade();
  rtcCatch();  
}

void maxCalc(){
  fadeMaxWhite = userDefMaxWhite*2.55;//converts user defined percentage (0-100) into a PWM value (0-255)
  fadeMaxBlue = userDefMaxBlue*2.55;//converts user defined percentage (0-100) into a PWM value (0-255)
}

void ledFade(){  
  if(whiteFadeOn = true){
    for(int fadeValue = fadeMaxWhite ; fadeValue <= 255; fadeValue +=1) {
    analogWrite(whiteLedPin, fadeValue);            
    delay(60000);
    }
  }
  
  if(blueFadeOn = true){
    for(int fadeValue = fadeMaxBlue ; fadeValue <= 255; fadeValue +=1) {
    analogWrite(blueLedPin, fadeValue);            
    delay(60000);
    }
  }
  
  if(whiteFadeOff = true){
    for(int fadeValue = fadeMaxWhite  ; fadeValue >= 0; fadeValue -=1) {
    analogWrite(whiteLedPin, fadeValue);          
    delay(60000);                            
    }
  }
  
  if(blueFadeOff = true){
    for(int fadeValue = fadeMaxWhite  ; fadeValue >= 0; fadeValue -=1) {
    analogWrite(blueLedPin, fadeValue);          
    delay(60000);                            
    }
  }
}

void rtcCatch(){
  if((DS1307_HR == 8)&&(DS1307_MIN == 0)){
    blueFadeOn = true;  
  }
  
  if((DS1307_HR ==8)&&(DS1307_MIN == 30)){
    whiteFadeOn = true;  
  }

  if((DS1307_HR ==13)&&(DS1307_MIN == 0)){
    whiteFadeOn = false;  
    blueFadeOn = false;
  }

  if((DS1307_HR ==20)&&(DS1307_MIN == 0)){
    whiteFadeOff = true;  
  }

  if((DS1307_HR ==20)&&(DS1307_MIN == 30)){
    blueFadeOff = true;  
  }

  if((DS1307_HR ==3)&&(DS1307_MIN == 0)){
    whiteFadeOff = false;
    blueFadeOff = false;
  }  
}

void rtcStart(){
  RTC.stop();
  RTC.set(DS1307_SEC,1);        //set the seconds
  RTC.set(DS1307_MIN,11);     //set the minutes
  RTC.set(DS1307_HR,13);       //set the hours
  RTC.set(DS1307_DOW,4);       //set the day of the week
  RTC.set(DS1307_DATE,22);       //set the date
  RTC.set(DS1307_MTH,1);        //set the month
  RTC.set(DS1307_YR,11);         //set the year
  RTC.start();  
}

i also plan to clean the code up a bit and put it into 2 objects purely so i can help break the code into segments!

cleaned up and now on version 1.01. ive added the abillity for the user to define the led intensity  as a percentage from 0-100% currently by code which is then converted from a percentage into a PWM value.

(in the finished verion or  the next version i will add a screen and buttons that enable the user to set the intensity on the fly, might do that next as ive got various lcds and an lcd shield)

also another point if I multiply an Int by a float its possible to get the occational float value, will that automatically be parsed into an int? i.e. rounded up. im assuming so .... need to plug it in and see what happens.

edit also realised a bit of code error in the fade code, so im just looking at that too.
10  Forum 2005-2010 (read only) / Interfacing / Re: Reef Pico LED intefacing, 3 watt LED's and RTC on: January 22, 2011, 06:47:20 am
Hello Lefty, thank you for the reply and the information.

firstly to fix the quote
Quote
8:00AM = start fading first blue chain of led's in
8.30AM =  start fading in second white chain of led's in
8.00PM = start fading second white chain of led's out
8.30PM = start fading first blue chain of leds out.

and regarding the time frame you are correct but i mislead you with my description.

i want the leds to fade in from 0-100%  over the space fo say 1Hour
then to fade back, but its essentially the same as what you described.

i kinda came up with a solution this mornig in the shower :-?

i was thinking

if i had some code something along the lines of this i'll jsut do it in speak not code

At 8am set  boolean blueOn to true
At 8.30am set boolean whiteOn to true
at midday set boolean blueOn and whiteOn to false
At 8pm set boolean whiteOff to true
At 8.30pm set boolean blueOff to true
At 3.00 Am set boolean whiteOff and BlueOFF to false

then while the arduino is looping call an imade fade object

that has various If statements saying if boolean XYZ is true do this

then the system will jsut fade at its own pace until completed with the parameters being reset at midday and 3am respectively.

What do you guys think? i mean i havent had a chance to play yet but i will do now/within the next hour or so after ive finished tidying up the house  >smiley-sad :smiley
11  Forum 2005-2010 (read only) / Interfacing / Reef Pico LED intefacing, 3 watt LED's and RTC on: January 21, 2011, 05:05:19 pm
Hello lovely people!

after a pretty long break i recently picked up a new Arduino mega for a project i sort of started 6 months ago.

long story short, i started never finished, life took over and it was a job to pick back up, now that i've jsut finished my Uni exams for a few months i thought i'd have another stab.

firstly the first project can be found here:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1269962097/0

the idea was to build my own little reef computer for a pico tank that i set up, unfortunatly july 10 i had to dismantle my pico as it wasnt getting the attention it needed plus going away on holiday etc ment it was for the best. i restarted the pico  last month and with it restarted my interest in Arduinos, so i ordered my bits and bobs and would like to have another stab at the project.

i deciced to buy a second Mega so i could work on different aspects of the project before compiling it with my old (which is a mess of breadboards, wires, probes etc)

so without wasting any more time

Ladys and gentle men if you so choose to help.

I want to write a piece of software which utilizes the buckpucks of my DIY led light and fade my led's in via PWM and my RTC chip.
once ive got the basics sorted, i would like to incorporate a moon light and possibly have some fun with "random" weather patterns etc.

i've had a bit of a dabble this everning just "relearning the ropes" as it were with coding, the last object orientated programing i did was months a go, and with my poor memory unfortunatly some has slipped :smiley

So this is the stage im at so far...




....

yup thats it nothing!

ok not quite,

I hooked up my DIY RTC chip to my arduino and pulled over some test coding and used the sereal monitor to check it all works.

this was only ment to be a 10-15 minute job before starting some more productive coding but for some reason my RTC chip isnt working correctly or atleast my coding.

for some reason my "seconds" wont write properly.

when i call the serial monitor up it always starts from 0.
edit while typing this entry i realised i needed to hash out the RTC start program after it had been flashed to the RTC chip now we can move onto the fun bit

heres the given test code:
Code:
#include <WProgram.h>
#include <Wire.h>
#include <DS1307.h>

void setup()
{
  Serial.begin(9600);

  RTC.stop();
  RTC.set(DS1307_DOW,5);    
  RTC.set(DS1307_DATE,21);
  RTC.set(DS1307_MTH,1);    
  RTC.set(DS1307_YR,11);
  RTC.set(DS1307_SEC,34);      
  RTC.set(DS1307_MIN,46);    
  RTC.set(DS1307_HR,20);        
  RTC.start();

}

void loop()
{

  Serial.print(RTC.get(DS1307_HR,true)); //read the hour and also update all the values by pushing in true
  Serial.print(":");
  Serial.print(RTC.get(DS1307_MIN,false));//read minutes without update (false)
  Serial.print(":");
  Serial.print(RTC.get(DS1307_SEC,false));//read seconds
  Serial.print("      ");                 // some space for a more happy life
  Serial.print(RTC.get(DS1307_DATE,false));//read date
  Serial.print("/");
  Serial.print(RTC.get(DS1307_MTH,false));//read month
  Serial.print("/");
  Serial.print(RTC.get(DS1307_YR,false)); //read year
  Serial.println();
  delay(1000);
}

How would you guys go about implimenting some form of coding where say

8:00AM = start fading first chain of led's in
8.30AM =  start fading in second chain of led's in
8.00PM = start fading second chain of led's out
8.30PM = start fading second chain of leds out.

id like each chain to fade in roughly from 0-100% over the space of say 1hour

would you guys use something like a multi argument IF statement?

if((DS1307_HR == smiley-cool&&(DS1307_MIN = 0){
....
}

i know this consept is far from new nor is the application, yes i have googled and come across a little but i just wanted to compile all my thoughts, code etc into my own thread.

Many thanks in advanced

Luke

P.s.

if anyones interested:

my 4ft x 2ftx 2ft Mixed reef
http://www.ocean-wonders.co.uk/messageboard/showthread.php/7553-Phoenix-s-Reef-V3.0/page18

and my LED driven Pico which this arduino project is for:
http://www.ocean-wonders.co.uk/messageboard/showthread.php/6439-Phoenix-s-Little-Suprise/page16






12  Forum 2005-2010 (read only) / Interfacing / Re: Aquarium Reef Controller, stage 1, the LCD shield, on: January 21, 2011, 04:41:18 pm
Wow has it been a long time since i was last on here.

*blows dust off Arduino mega*

Like all good things, they take time and sometimes lifes prioritys like university and work take over. i havent really picked up an Arduino in months and July 10 i had to dismantle my pico but thankfully i recently restarted it and this has kick started my joy for Arduinos again. last week i placed an order for a second Arduino mega i also go TONNES of "stuff" leds, resistors, basic chips, pots, mini strepper, sometihnglike 4 different LCD screens all of which to play with.

The main project is Kinda on hiatus at the moment its kept safe and i do plan to pick it back up but for now i brought the second Mega to work on "other" functions. so i would like to now take it down a notch, forget LCD's for a moment, pH probes, temperature probes those can all be intergrated later. for now i want to work on lighting.

Specifically How to interface 2 chains of 3 watt led's via buckpucks and PWM, and an RTC.

Im going to start a new thread to help declutter this thread and my new drive for lighting.

the first side thread is here:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1295647519/0#0

and its about implimenting the lights.

tag along if anyone has any benficial infomation!
13  Forum 2005-2010 (read only) / Interfacing / Re: Aquarium Reef Controller, stage 1, the LCD shield, on: May 31, 2010, 06:41:23 pm
got a ph probe in the post today, now i just need a male BNC connector and some parts for a ph op amp (whihc i need to google about)
14  Forum 2005-2010 (read only) / Interfacing / Re: Aquarium Reef Controller, stage 1, the LCD shield, on: May 26, 2010, 01:15:07 pm
well heres the latest "up to date" image


we have the 16x2 lcd with 5 push button keypad,
the arduino mega,
the grey protoboard tot he left of the mega and below the lcd shield is empty, im just using the it for a common ground pin and a common 5V pin.

we have the RTC module below the mega board and on the right is my semi finished temperature board, the board has 3 x 3 header pins (with each of the the white temperature probes having the males that match up) and then for sheer geekery i have a "power" led on the board which i need to solder in.  ( but that pink one is waaay to bright).

placed an order for a PH meter off ebay but i just found out i need to build an Op-amp (operation amplifier) for it so i need to order some parts once my probes here.

I want to start doing work on a powerbar/ SSR but theres so many i dont really know which to order does anyone have any links to a Relay tutorial or similar.

15  Forum 2005-2010 (read only) / Interfacing / Re: Aquarium Reef Controller, stage 1, the LCD shield, on: May 20, 2010, 02:48:10 pm
Geez does it feel like a long time i had a chance to work on this project ive had exams this last week and into the next so this has taken a back seat for a while. but i booted up the sketch and had a play tonight,

i seriously need to re think my menu code and the itterations the arduino has to go through, i never thought id say it but its got slow! the time it used to take to load one menu for another was nano seconds now its taking about 1 second per press. i think its because of how i call the menu.

so my next version of code (im on version 1.05 now!) (1 was jsut a basic hello world, 1.02 was getting the keyboard adn the first intereactive program, 1.03, was RTC 1.04 is Time probes)

im going to try and focus and make it "light" i dont think it helps not having a 20 x 4 lcd because im forced to code more "pages" to get all the data i want, if it wasnt for the fact im saving up for a new tank id think about getting a new lcd shield laugh.

Ludnix have you done any menu coding yet? or still sort of coding all your bits and bobs before you mash it into one controller?

plus im looking at sorting the LED fades in when a certain time is set.

all in all im far too busy and limited by my own time fundings and information  :-/

edit that sorted out my laggy program, i just re ordered the way my methods were called ( origionally it was temperature, led brightness (that doens nothing really) then load the menu then finally call the keypad listener method.

simply pulled my menuloader method to the top/first and its back to being lighting quick  ;D
Pages: [1] 2 3 4