Happy HolidaySs Giveaway - Last Sponsor Giveaway of the Year!

Come Enter the BrewDeals/FastFerment Giveaway!


Home Brew Forums > Home Brewing Beer > DIY Projects > Fermenters > TeensyPi Networked Temperature Controller
Reply
 
LinkBack Thread Tools
Old 04-29-2013, 03:03 AM   #301
jimmayhugh
Turgid Member
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
 
jimmayhugh's Avatar
Recipes 
 
Join Date: Feb 2011
Location: Las Vegas, NV
Posts: 605
Liked 49 Times on 43 Posts
Likes Given: 2

Default LCD Boards

Here are the I2C RGB LCD boards that I designed:


The upper board is the current iteration.

They are compatible with the Adafruit I2C RGB LCD boards, but can also be expanded to include up to eight of the LCDs on the I2C bus.

The software I've written will support either the RGB LCDs or the standard HD44780 LCD.

More info at my web site.

__________________
TeensyNet Networked Controller
ButtCrack Brewery
And This Is Why We Drink...
Cogito, ergo bibere cervisia sum
jimmayhugh is offline
 
Reply With Quote Quick reply to this message
Old 04-30-2013, 03:05 PM   #302
zdravac
Feedback Score: 0 reviews
Recipes 
 
Join Date: Apr 2013
Location: , Croatia
Posts: 17
Default

Quote:
Originally Posted by jimmayhugh View Post
The teensypi_daemon controls the serial communications between the Teensy 3.0 board and the RPi. Give this a try:

Shut down the Apache Server:
Code:
sudo apachectl stop
Kill the teensypi_daemon
Code:
sudo killall teensypi_daemon
Wait a few seconds for the daemon to re-appear, and verify that its there:
Code:
ps aux | grep teensypi_daemon | grep -v grep
Go to /var/www/htdocs

Send a command to the Teensy 3.0 board:
Code:
sudo php getCommand.php 7
and post the result here.

What you should see is a comma-delimited list of values, listing either the current temperature or state of each temp sensor or switch.

Let me know how that works out.
I did everything you said. The result is:

Code:
teensypi@teensypi /var/www/htdocs $ sudo php getCommand.php 7

Number of Arguments:2
getCommand.php
7
I don't know what is wrong here, but the web page is visible only when the teensypi_daemon is not running. I even tried a different SD card, but with no luck.

Also I noticed that teensypi_daemon is taking 90-97% of cpu time. Is that normal? Does that have anything to do with the fact that I am only running RPi, and no MEGA (or Teensy) on the other side of serial?
__________________
zdravac is offline
 
Reply With Quote Quick reply to this message
Old 04-30-2013, 05:07 PM   #303
jimmayhugh
Turgid Member
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
 
jimmayhugh's Avatar
Recipes 
 
Join Date: Feb 2011
Location: Las Vegas, NV
Posts: 605
Liked 49 Times on 43 Posts
Likes Given: 2

Default

Quote:
Originally Posted by zdravac View Post

I did everything you said. The result is:

teensypi@teensypi /var/www/htdocs $ sudo php getCommand.php 7

Number of Arguments:2
getCommand.php
7


I don't know what is wrong here, but the web page is visible only when the teensypi_daemon is not running. I even tried a different SD card, but with no luck.

Also I noticed that teensypi_daemon is taking 90-97% of cpu time. Is that normal? Does that have anything to do with the fact that I am only running RPi, and no MEGA (or Teensy) on the other side of serial?
Now it makes more sense...

Yeah, things will work much better when you have at least a Teensy 3.0 or Mega2650 hooked up and have at least one sensor or switch attached to the 1-Wire mini-lan.

The teensy_daemon runs continuously, and if nothing else is pre-empting it, will appear to be consuming a lot of resource. Once you have other parts of the TeensyPi system engaged, things will settle down.
__________________
TeensyNet Networked Controller
ButtCrack Brewery
And This Is Why We Drink...
Cogito, ergo bibere cervisia sum
jimmayhugh is offline
 
Reply With Quote Quick reply to this message
Old 05-01-2013, 04:20 AM   #304
jsbird
HBT_SUPPORTER.png
Feedback Score: 0 reviews
Recipes 
 
Join Date: Oct 2012
Posts: 40
Likes Given: 2

Default

My switchboards arrived from HK and the look great. Unfortunately I think I bought the wrong size/watts versions. I bought 1/2W and from the board outline and contacts they look big. Can you confirm which wattage you designed the board for jimmaugh?

LCD boards shipped 9 days later so hoping to have them next week!

Thx!

__________________
jsbird is offline
 
Reply With Quote Quick reply to this message
Old 05-01-2013, 04:22 AM   #305
jsbird
HBT_SUPPORTER.png
Feedback Score: 0 reviews
Recipes 
 
Join Date: Oct 2012
Posts: 40
Likes Given: 2

Default

Quote:
Originally Posted by jsbird
My switchboards arrived from HK and the look great. Unfortunately I think I bought the wrong size/watts versions. I bought 1/2W and from the board outline and contacts they look big. Can you confirm which wattage you designed the board for jimmaugh?

LCD boards shipped 9 days later so hoping to have them next week!

Thx!
Should clarify that I'm talking about the wrong wattage resistors.
__________________
jsbird is offline
 
Reply With Quote Quick reply to this message
Old 05-01-2013, 12:14 PM   #306
jimmayhugh
Turgid Member
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
 
jimmayhugh's Avatar
Recipes 
 
Join Date: Feb 2011
Location: Las Vegas, NV
Posts: 605
Liked 49 Times on 43 Posts
Likes Given: 2

Default

Quote:
Originally Posted by jsbird View Post
My switchboards arrived from HK and the look great. Unfortunately I think I bought the wrong size/watts versions. I bought 1/2W and from the board outline and contacts they look big. Can you confirm which wattage you designed the board for jimmaugh?

LCD boards shipped 9 days later so hoping to have them next week!

Thx!
I use either 1/4 watt or 1/8 watt resistors, whichever is available at the time. The 1/2 watt resistor will work electronically, just don't know if they'll fit in the mounting holes.
__________________
TeensyNet Networked Controller
ButtCrack Brewery
And This Is Why We Drink...
Cogito, ergo bibere cervisia sum
jimmayhugh is offline
 
Reply With Quote Quick reply to this message
Old 05-01-2013, 06:22 PM   #307
zdravac
Feedback Score: 0 reviews
Recipes 
 
Join Date: Apr 2013
Location: , Croatia
Posts: 17
Default

Quote:
Originally Posted by jimmayhugh View Post
Now it makes more sense...

Yeah, things will work much better when you have at least a Teensy 3.0 or Mega2650 hooked up and have at least one sensor or switch attached to the 1-Wire mini-lan.

The teensy_daemon runs continuously, and if nothing else is pre-empting it, will appear to be consuming a lot of resource. Once you have other parts of the TeensyPi system engaged, things will settle down.
Hi Jim!

I am trying to get MEGA2560 to work with your sketch. Is there something I have to adjust, since you are using this sketch on Teensy? (eeprom addresses and such) cause only thing I get on serial monitor is

Code:
Serial Debug running at 115200 baud
Serial1 Debug running at 115200 baud
and nothing else. No eeprom messages, what I would expect, regarding it's in your code beetwen serial and serial1 stuff in void setup(). I have one wire temp sensors on pin 9 connected, btw.
__________________
zdravac is offline
 
Reply With Quote Quick reply to this message
Old 05-02-2013, 02:00 AM   #308
jimmayhugh
Turgid Member
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
 
jimmayhugh's Avatar
Recipes 
 
Join Date: Feb 2011
Location: Las Vegas, NV
Posts: 605
Liked 49 Times on 43 Posts
Likes Given: 2

Default

Quote:
Originally Posted by zdravac View Post
Hi Jim!

I am trying to get MEGA2560 to work with your sketch. Is there something I have to adjust, since you are using this sketch on Teensy? (eeprom addresses and such) cause only thing I get on serial monitor is

Code:
Serial Debug running at 115200 baud
Serial1 Debug running at 115200 baud
and nothing else. No eeprom messages, what I would expect, regarding it's in your code beetwen serial and serial1 stuff in void setup(). I have one wire temp sensors on pin 9 connected, btw.
OK, I'm assuming that you did everything mentioned here, especially the level converters.

Go into the Teensy3.0 (or in your case Mega2560) code and look for the following:

Code:
const uint8_t maxChips       = 36; // Maximum number of Chips
const uint8_t maxActions     = 12; // Maximum number of Actions
I would probably set those values to at least half of what they are now.

Then comment out half of the chip and action structures:
Code:
chipStruct chip[maxChips] =
{
  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 }
};



chipActionStruct action[maxActions] =
{
  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
//  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
//  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
//  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
//  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
//  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
//  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 }
};
And maybe ony enable two PIDs for now:
Code:
const uint8_t maxPIDs = 2;
uint8_t pidCnt = 0;

typedef struct
{
  bool       pidEnabled;
  chipStruct *tempPtr;
  double     pidSetPoint;
  chipStruct *switchPtr;
  double     pidKp;
  double     pidKi;
  double     pidKd;
  int        pidDirection;
  uint32_t   pidWindowSize;
  uint32_t   pidwindowStartTime;
  double     pidInput;
  double     pidOutput;
  PID       *myPID;
}chipPIDStruct;

chipPIDStruct ePID[maxPIDs] =
{
  { FALSE, NULL, 70, NULL, 0, 0, 0, 0, 5000, 0, 0, 0, NULL },
//  { FALSE, NULL, 70, NULL, 0, 0, 0, 0, 5000, 0, 0, 0, NULL },
//  { FALSE, NULL, 70, NULL, 0, 0, 0, 0, 5000, 0, 0, 0, NULL },
//  { FALSE, NULL, 70, NULL, 0, 0, 0, 0, 5000, 0, 0, 0, NULL },
//  { FALSE, NULL, 70, NULL, 0, 0, 0, 0, 5000, 0, 0, 0, NULL },
//  { FALSE, NULL, 70, NULL, 0, 0, 0, 0, 5000, 0, 0, 0, NULL },
//  { FALSE, NULL, 70, NULL, 0, 0, 0, 0, 5000, 0, 0, 0, NULL },
  { FALSE, NULL, 70, NULL, 0, 0, 0, 0, 5000, 0, 0, 0, NULL }
};
Then find the following:

Code:
const uint8_t allDebug      = 0x01; 
const uint8_t pidDebug      = 0x02; 
const uint8_t eepromDebug   = 0x04; 
const uint8_t chipDebug     = 0x08; 
const uint8_t serial1Debug  = 0x10; 
const uint8_t serialDebug   = 0x20; 

uint8_t setDebug = 0x0;
and set setDebug t0 0x08, recompile, upload and run it. When you start the Serial monitor, it should display some info regarding the Chips on the 1-wire mini-lan.

The reason you're reducing the number of chips, actions, and PIDs is that the arrays chew up big gobs of SRAM which you'll probably need to get the debug code running. Stange things happen when you run out of SRAM.
__________________
TeensyNet Networked Controller
ButtCrack Brewery
And This Is Why We Drink...
Cogito, ergo bibere cervisia sum
jimmayhugh is offline
 
Reply With Quote Quick reply to this message
Old 05-02-2013, 05:20 PM   #309
zdravac
Feedback Score: 0 reviews
Recipes 
 
Join Date: Apr 2013
Location: , Croatia
Posts: 17
Default

Quote:
Originally Posted by jimmayhugh View Post
OK, I'm assuming that you did everything mentioned here, especially the level converters.

Go into the Teensy3.0 (or in your case Mega2560) code and look for the following:

Code:
const uint8_t maxChips       = 36; // Maximum number of Chips
const uint8_t maxActions     = 12; // Maximum number of Actions
I would probably set those values to at least half of what they are now.

Then comment out half of the chip and action structures:
Code:
chipStruct chip[maxChips] =
{
  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
//  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 },
  { {0,0,0,0,0,0,0,0}, 0, 0 }
};



chipActionStruct action[maxActions] =
{
  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
//  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
//  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
//  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
//  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
//  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
//  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 },
  { FALSE, NULL, -255, NULL, 'F', 0, 0, 255, NULL, 'F', 0, 0 }
};
And maybe ony enable two PIDs for now:
Code:
const uint8_t maxPIDs = 2;
uint8_t pidCnt = 0;

typedef struct
{
  bool       pidEnabled;
  chipStruct *tempPtr;
  double     pidSetPoint;
  chipStruct *switchPtr;
  double     pidKp;
  double     pidKi;
  double     pidKd;
  int        pidDirection;
  uint32_t   pidWindowSize;
  uint32_t   pidwindowStartTime;
  double     pidInput;
  double     pidOutput;
  PID       *myPID;
}chipPIDStruct;

chipPIDStruct ePID[maxPIDs] =
{
  { FALSE, NULL, 70, NULL, 0, 0, 0, 0, 5000, 0, 0, 0, NULL },
//  { FALSE, NULL, 70, NULL, 0, 0, 0, 0, 5000, 0, 0, 0, NULL },
//  { FALSE, NULL, 70, NULL, 0, 0, 0, 0, 5000, 0, 0, 0, NULL },
//  { FALSE, NULL, 70, NULL, 0, 0, 0, 0, 5000, 0, 0, 0, NULL },
//  { FALSE, NULL, 70, NULL, 0, 0, 0, 0, 5000, 0, 0, 0, NULL },
//  { FALSE, NULL, 70, NULL, 0, 0, 0, 0, 5000, 0, 0, 0, NULL },
//  { FALSE, NULL, 70, NULL, 0, 0, 0, 0, 5000, 0, 0, 0, NULL },
  { FALSE, NULL, 70, NULL, 0, 0, 0, 0, 5000, 0, 0, 0, NULL }
};
Then find the following:

Code:
const uint8_t allDebug      = 0x01; 
const uint8_t pidDebug      = 0x02; 
const uint8_t eepromDebug   = 0x04; 
const uint8_t chipDebug     = 0x08; 
const uint8_t serial1Debug  = 0x10; 
const uint8_t serialDebug   = 0x20; 

uint8_t setDebug = 0x0;
and set setDebug t0 0x08, recompile, upload and run it. When you start the Serial monitor, it should display some info regarding the Chips on the 1-wire mini-lan.

The reason you're reducing the number of chips, actions, and PIDs is that the arrays chew up big gobs of SRAM which you'll probably need to get the debug code running. Stange things happen when you run out of SRAM.
OK, I did as you suggested, cut down the number of chip, actions, and pids. But now I am getting some compile warnings (on lines where Serial.print(F()); is used. It says: "TeensyPi.ino:278: warning: only initialized variables can be placed into program memory area") But, sketch compiles, and when uploaded it gives the same result as earlier, no serial debug from EEPROM part in setup().

Now, something in that part of code is bothering me.

Code:
  Serial.print(F("Serial Debug running at "));
  Serial.print(baudRate);
  Serial.println(F(" baud"));
this returns: "Serial Debug running at 115200 baud" so this is OK
Code:
  eeResult = EEPROM.read(EEPROMidAddr);
 // Serial.println(eeResult, HEX);
  if((setDebug & eepromDebug) || (setDebug & allDebug))
  { 
    Serial.print(F("eeResult = 0x"));
    Serial.println(eeResult, HEX);
  }
  
  if(eeResult != 0x55)
  {
    if((setDebug & eepromDebug) || (setDebug & allDebug))
    { 
       Serial.println(F("No EEPROM Data"));
    }
  
    eepromReady = FALSE;
    findChips();
    saveStructures();
  }else{

    if((setDebug & eepromDebug) || (setDebug & allDebug))
    { 
      Serial.println(F("Getting EEPROM Data"));
    }

    chipCnt = EEPROM.read(EEPROMccAddr);
    readStructures();
    if((setDebug & eepromDebug) || (setDebug & allDebug))
    { 
      Serial.println(F("EEPROM Data Read Completed"));
    }
  
    eepromReady = TRUE;
    
  }
  
  if((setDebug & eepromDebug) || (setDebug & allDebug))
  { 
    Serial.print( (sizeof(chipStruct) / sizeof(byte) ) * maxChips);
    Serial.println(F(" bytes in chip structure array"));
    Serial.print( (sizeof(chipActionStruct) / sizeof(byte) ) *maxActions);
    Serial.println(F(" bytes in action structure array"));
    Serial.print( (sizeof(chipPIDStruct) / sizeof(byte) ) *maxPIDs);
    Serial.println(F(" bytes in pid structure Array"));
  }
this returns nothing?? If you noticed in the second line I put "Serial.println(eeResult, HEX);" and when uncommented it returns "55" thus "if(eeResult != 0x55)" is not executed.

Also " if((setDebug & eepromDebug) || (setDebug & allDebug))" doesn't get executed as well because setDebug = 0x08, eepromDebug = 0x04, allDebug = 0x01, and combined as in if statement gives 0
Code:
  Serial1.begin(baudRate);
  Serial.print(F("Serial1 Debug running at "));
  Serial.print(baudRate);
  Serial.println(F(" baud"));
this returns: "Serial1 Debug running at 115200 baud" which is also OK

PS
I just changed setDebug to 0x04 not 0x08 as you suggested, and now EEPROM part gives some feedback. Here it is:

Code:
 Serial Debug running at 115200 baud
eeResult = 0x55
Getting EEPROM Data
Entering readStructures
EEPROMchipAddr = 0x40
Read 168 bytes from address Ox40
EEPROMactionAddr = 0xF0
Read 174 bytes from address OxF0
EEPROMpidAddr = 0x1A0
Read 123 bytes from address Ox1A0
readStructures() EEPROM Data Read of 465 bytes Completed
Exiting readStructures
0x7A9: 0x28, 0x5E, 0xC7, 0x47, 0x04, 0x00, 0x00, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xF7
0x7B9: 0xF3, 0x47, 0x04, 0x00, 0x00, 0xF9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x7C9: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x7D9: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x7E9: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x7F9: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x809: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x819: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x829: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x839: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x849: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 

0x23A: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x24A: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x25A: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x26A: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x27A: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x28A: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x29A: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x2AA: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x2BA: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x2CA: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x2DA: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 

0x2E8: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x2F8: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x308: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x318: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x328: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x338: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x348: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x358: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 

EEPROM Data Read Completed
168 bytes in chip structure array
174 bytes in action structure array
123 bytes in pid structure Array
Serial1 Debug running at 115200 baud
Does this make sense to you?

Also I wanted to check one other thing, how to connect MEGA2560 and RPi; if I got it right it should be like this:

Code:
MEGA RX1 pin 19 - level shifter ch1 - RPi GPIO14 (TX0)
MEGA TX1 pin 18 - level shifter ch2 - RPi GPIO15 (RX0)
MEGA pin 8 - level shifter ch3 - RPi GPIO17
Am I right about this? If that's the case, unfortunately I have to delay the whole thing for 2 weeks, since I have only one 2ch level shifter
__________________
zdravac is offline
 
Reply With Quote Quick reply to this message
Old 05-02-2013, 07:17 PM   #310
jimmayhugh
Turgid Member
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
 
jimmayhugh's Avatar
Recipes 
 
Join Date: Feb 2011
Location: Las Vegas, NV
Posts: 605
Liked 49 Times on 43 Posts
Likes Given: 2

Default

OK, the chip structure array shows two ds18b20 chip have been detected, so that part of the code appears to work. I'll examine the code this evening.

The extra control pin is serial flow control. With just two chips it may not be a problem, but you need the level shifter for the long run.

__________________
TeensyNet Networked Controller
ButtCrack Brewery
And This Is Why We Drink...
Cogito, ergo bibere cervisia sum
jimmayhugh is offline
 
Reply With Quote Quick reply to this message
Reply



Quick Reply
Message:
Options
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Arduino - Networked Temperature Monitor jimmayhugh Kegerators and Keezers 81 01-27-2013 01:22 AM
Temperature Controller sy2088 Equipment/Sanitation 3 10-25-2012 07:28 PM
Lux Temperature Controller scoots Fermenters 9 07-06-2012 02:38 PM
temperature controller from deas fridge - use as external controller on live fridge? BrewingChemist Fermenters 1 05-22-2012 11:21 PM
Johnson Analog Temperature Controller Temperature Profile Coastarine Equipment/Sanitation 4 10-11-2010 04:58 PM



Newest Threads

LATEST SPONSOR DEALS