TeensyPi Networked Temperature Controller

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Thanks Jim it worked, a possibility to change it via the GUI would be nice to have even though changing the Teensy 3.0 code, recompiling and uploading took less than a minute :)

Any plans for RTD (PT100) sensor support in the near future?

Never investigated it, but anything's possible if there's enough interest. :drunk:
 
Hey Jim...been following this since day 1 and really like what's been going on so please don't take this next statement the wrong way....I'm a bit lost as to why or what you're looking for in the pursuit of new boards, hardware, and or ways to get to the end of this project if there is one....so please bring me up to date as I'm curious as to where it's going....will follow you to the end if my time and resources can hold out....again just an awesome project and one that I hope to finish...sincere regards

I just like to tinker :p

I was an embedded systems designer (hardware and software) for almost 25 years. I quit professionally in 1999, and entered an entirely new career field ( court marshal) but still liked to keep my hand and mind in the game.

There's really no set endpoint on this project, it just started, and I'm taking it wherever it leads me. I think that this setup could be useful for other projects besides homebrewing, so if somebody sends me an idea, I'll look into it.

:tank:
 
I've got the code for the 1-wire slave emulation working pretty well on the Teensy 3.0 platform. It's currently allowing me to use the MAX31855K Cold-Junction Compensated Thermocouple-to-Digital Converter as a 1-wire device.

This opens up a world of possibilties, as it now should allow just about any device that can be interfaced to the Teensy 3.o to be mounted and accessed on a 1-wire mini-lan. I'm thinking humidity sensors, flow rate, pressure, etc.

Any thoughts?
 
This is a very small board that uses the DS2762 chip as a 1-wire K-type thermocouple reader:

ds2762-board.png


The two capacitors are 0.1uf, and the resistor is 1K.

I've added or updated the Teensypi.ino file for the Teensy 3.0, some files on the RPi, and the eagle/gerber files (DS2762.zip) on my github account.

Some caveats:

Since we are dealing with microvolt variations, noise is a problem. This board has ground plane pours on both sides of the board to help alleviate this, but it may be necessary to put a small (.001uf to .1uf) capacitor in parallel with the thermocouple. It also helps if the thermocouple leads are a twisted pair.

This probably won't work with a grounded thermocouple. It also seems to work better with better quality thermocouples. Some that I bought off eBay were very erratic.

Right now, the thermocouple only registers down to 0 degrees celsius (32 degrees Fahrenheit), any value below that just comes back as 0 degrees C. The upper temp range is 1024 degrees C, but I haven't tested it at anywhere near that range :drunk:

Let me know how it works for you if anyone builds one... :D
 
OSH Park is one of the board fabricators that I use to make small runs of my TeensyPi boards. These are high-quality boards, and I highly recommend the service.

They now allow us to share the designs on their site, and anyone can order a minimum of three boards from them with free shipping.

I'm in the process of uploading some of my boards there for anyone that would like to get some boards for their project.

I don't receive any remuneration from OSH Park for this service.
 
I've got the code for the 1-wire slave emulation working pretty well on the Teensy 3.0 platform. It's currently allowing me to use the MAX31855K Cold-Junction Compensated Thermocouple-to-Digital Converter as a 1-wire device.

This opens up a world of possibilties, as it now should allow just about any device that can be interfaced to the Teensy 3.o to be mounted and accessed on a 1-wire mini-lan. I'm thinking humidity sensors, flow rate, pressure, etc.

Any thoughts?

A pressure sensor would be an excellent addition to the teensypi project for brewing on a HLT and boil kettle.
 
A pressure sensor would be an excellent addition to the teensypi project for brewing on a HLT and boil kettle.

What kind of pressure are you trying to measure? Are we talking about the volume of water in the HLT/Kettle based on its weight? Atmosphereic pressure? Show me a sensor that you want to integrate into the system.
 
the brewtroller site (https://www.oscsys.com/projects/brewtroller/system-design/volume-measurement) hows a schematic for a volume measurement using a bubbler system using an aquarium pump. It does not state what sensor is used, but does describe the theory. It appears it could be easily adapted to your project. Unfortunately, I can only follow, not lead, when it comes to this sort of project.
 
Just getting all my components trickling in from ebay finally, and just starting to assemble. I'm still waiting on a few parts that are here tomorrow before I can get it up and running, but in the meantime I had a few questions. I didn't want to keep barraging Jim with questions so I thought I'd ask here. Bear with me as I'm pretty new to this electronics stuff and have only dabbled briefly a few years back, ha.

-On the LCD board, why are the bottom left two 4k7 resistors left off? Any harm in having them there, I'm a little confused by the board diagram, ha
-Similarly, what are the A0, A1, A2 jumpers for on the LCD board, can't figure out the board...
-I'm not seeing any 3v3 screw terminal on the PiPlate, anywhere I can grab this from easily?

I think that's all for now!
 
Just getting all my components trickling in from ebay finally, and just starting to assemble. I'm still waiting on a few parts that are here tomorrow before I can get it up and running, but in the meantime I had a few questions. I didn't want to keep barraging Jim with questions so I thought I'd ask here. Bear with me as I'm pretty new to this electronics stuff and have only dabbled briefly a few years back, ha.
-On the LCD board, why are the bottom left two 4k7 resistors left off? Any harm in having them there, I'm a little confused by the board diagram, ha
Those are 4k7 pullup resistors for the SDA/SCL I2C signals. If you have multiple LCD boards connected, you only need one set of the resistors.
-Similarly, what are the A0, A1, A2 jumpers for on the LCD board, can't figure out the board...
You can have up to eight LCD boards on the I2C bus, AO-A2 are the address pins. For LCD0, all three jumpers are shunted, for LCD1 shunt A1 and A2, LCD2 shunt A0 and A2, etc.
-I'm not seeing any 3v3 screw terminal on the PiPlate, anywhere I can grab this from easily?
The Version 5 TeensyPi Board, uses level shifters on all I/O lines that eliminate the need for a separate 3v3 supply. All of my other boards are 5v tolerant.

Have fun.
 
Awesone, thanks a lot!

My BS170's finally came in so I got them all installed and am starting to try and configure the software now. I have the following problems:

-I can't get my wireless internet to connect. The first problem was that my wlan adapter was at wlan1 not wlan0, so I changed all the settings in the config file to reflect that. It still doesn't want to connect. I can't get it to show any results when scanning using "iwlist wlan1 scan". I know the wifi adapter is good because I had it running on the actual raspberry pi software before I loaded the teensy image. I'm not sure what the issue is, the device is listed and seems to be recognized, I'm just installing wicd to see if that will work or not.
EDIT: Scratch this got it working. For anyone else having issues in the future, my issue was that it was an open network. I had to blank out all the lines starting with "wpa-" and add this to the bottom:

wireless-essid dd-wrt
wireless-mode managed

-I can't connect to the raspberry pi in my web browser via the ip address (when hooked up to the ethernet port). I can ssh into it and have set it up, but now typing in the IP into my browser it just sits at "waiting for 192.168.1.xxx". I also can't get any response pinging it via the command line. This may have something to do with my last issue, below

EDIT: I found this a few pages back, probably my issues as I don't have anything loaded onto the Teensy3.0 and I have no 1-wire devices hooked up yet.
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.

-I don't actually know what to upload to the teensy. I uploaded the blink program just to make sure I knew what to do, but don't know what you mean when you say "Load, compile and upload the Teensy File to the Teensy 3.0 board." Which files do I upload from the Teensy30Libraries.zip file?

Thanks again, and sorry for the simple questions!

FINAL EDIT: Scratch this whole post, ha. I got it figured out after much confusion. For anyone searching in the future who may find this, you have to load the Teensypi.ino sketchbook file from github. I needed to install the Arduino PID library and the Adafruit MAX31855 library to get it to compile.

After that I attached one of my probes and booted up the Teensypi, success!
 
OK more software questions. Trying to get the LCD to work.

I've soldered up the first LCD board, I did add the pullup resistors. I've jumpered the 5v and 3v3 pins and also added the 5v power select shunt on the board. I don't have any switches activated and I have no address pins jumpered so it's on 0x27.

The other weird thing is that I only have a 16 pin 4x20 Hitachi HD44780 LCD, because it's a single color. Don't know if that makes a difference but the last two pins on the board are not connected to anything.

OK, so first off the device seems to be recognized by the RPi:

Code:
teensypi@teensypi ~ $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- 27 -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

I tried to compile the i2c_lcd.c file with the code you had before, but I was getting an error about a missing my_global.h file, so I added something I found via google and it seemed to compile fine:

Code:
sudo gcc -o ./i2c_lcd -I/usr/localinclude -L/usr/local/lib -lwiringPi i2c_lcd.c `mysql_config --cflags --libs`

I then run the program with the following code, and get this output, but I don't understand it really.

Code:
sudo ./i2c_lcd
Raspberry Pi LCD test program
Initializing MySQL
mysql_init passed
mysql_real_connect passed
action mysql_query passed
mysql_store_result passed
num_action_fields = 7
getStatus()
Please enter your message: The return message was
0,255,ÿ,ÿ,-255,255;0,255,ÿ,ÿ,-255,255;0,255,ÿ,ÿ,-255,255;0,255,ÿ,ÿ,-255,255;0,255,ÿ,ÿ,-255,255;0,255,ÿ,ÿ,-255,255;0,255,ÿ,ÿ,-255,255;0,255,ÿ,ÿ,-255,255;0,255,ÿ,ÿ,-255,255;0,255,ÿ,ÿ,-255,255;0,255,ÿ,ÿ,-255,255;0,255,ÿ,ÿ,-255,255

parseStatus()
action = 0,255,ÿ,ÿ,-255,255
actionStr = 0,255,ÿ,ÿ,-255,255
action = 0,255,ÿ,ÿ,-255,255
actionStr = 0,255,ÿ,ÿ,-255,255
action = 0,255,ÿ,ÿ,-255,255
actionStr = 0,255,ÿ,ÿ,-255,255
action = 0,255,ÿ,ÿ,-255,255
actionStr = 0,255,ÿ,ÿ,-255,255
action = 0,255,ÿ,ÿ,-255,255
actionStr = 0,255,ÿ,ÿ,-255,255
action = 0,255,ÿ,ÿ,-255,255
actionStr = 0,255,ÿ,ÿ,-255,255
action = 0,255,ÿ,ÿ,-255,255
actionStr = 0,255,ÿ,ÿ,-255,255
action = 0,255,ÿ,ÿ,-255,255
actionStr = 0,255,ÿ,ÿ,-255,255
action = 0,255,ÿ,ÿ,-255,255
actionStr = 0,255,ÿ,ÿ,-255,255
action = 0,255,ÿ,ÿ,-255,255
actionStr = 0,255,ÿ,ÿ,-255,255
action = 0,255,ÿ,ÿ,-255,255
actionStr = 0,255,ÿ,ÿ,-255,255
action = 0,255,ÿ,ÿ,-255,255
actionStr = 0,255,ÿ,ÿ,-255,255
updateLCDs()

I'm not seeing anything to the LCD. Any help?
Thanks again!
 
There should have been a pre-compiled executable version of i2c_lcd in the /var/www/htdocs directory of the RPi.

The i2c_lcd code is used to display the status of a selected Action. When you assign a set of thermometer and swiches to a given action, you have the option of enabling an LCD to display the name and values of the action, as well as selecting an 18-pin RGB-backlit lcd or a 16-pin single-color backlit LCD. The LCDs are selected by entering LCD0-LCD7, corresponding to i2c addresses 0x20-0x27.

When the Action screen is accessed via a web browser, the php script interrogates the MYSQL database, and will enable any selected LCDs.

The i2c_lcd software is not meant to run standalone.

Sorry I can't double-check any of this right now, my TeensyPi rig is temporarily off while I'm working on the TeensyNet project.
 
Hey guys, before I dedicate 40 pages worth of reading time on this thread, I was hoping to get one quick question answered. What I'm wanting to do it just basic temp monitoring of my HLT, MLT and BK, and display it on a small LCD screen. No automation yet. Will the RPi , and your code, allow me to do this?
 
Hey guys, before I dedicate 40 pages worth of reading time on this thread, I was hoping to get one quick question answered. What I'm wanting to do it just basic temp monitoring of my HLT, MLT and BK, and display it on a small LCD screen. No automation yet. Will the RPi , and your code, allow me to do this?

If that's all you ever want to do, the TeensyPi is perfectly capable of doing all of that with some small changes to the code, or you can take a look at the stuff I did here. That project was simply a monitor, and I used both character-based and graphical LCDs in the process.

If your planning on adding automation, thermocouples, pid-based solutions etc, then this is a viable project for you.

If you want to use just an RPi, take a look here.

Hope this helps...
 
Great project. I intend and hope to use the TeensyPi for a few brewing projects, the first of which is a http://makezine.com/projects/make-25/sous-vide-immersion-cooker/sous vide machine that I will use to pasteurize hard cider. My current rate of stovetop bottle bombs is unacceptably high.

I plan to use three or four 300W beverage heaters as the heating elements. It occurs to me that this could give three or four levels of granularity to the control signal (heat into the water). I think I understand the basics of PID theory, but I'm having a tough time wrapping my head around calculating where the cutoff points between two elements on and three elements on would be, or what the units for that would be. Also, any pointers in your code for where that calculation is done so that I might look at modifying it?

Thanks. I will keep looking myself and will add a post if I learn anything.
 
Anyone able to post a video of a brew day using TeensyPi? I havent even seen pictures of cooking or complete setups. Im really interested in making one of these.
 
Great project. I intend and hope to use the TeensyPi for a few brewing projects, the first of which is a http://makezine.com/projects/make-25/sous-vide-immersion-cooker/sous vide machine that I will use to pasteurize hard cider. My current rate of stovetop bottle bombs is unacceptably high.

I plan to use three or four 300W beverage heaters as the heating elements. It occurs to me that this could give three or four levels of granularity to the control signal (heat into the water). I think I understand the basics of PID theory, but I'm having a tough time wrapping my head around calculating where the cutoff points between two elements on and three elements on would be, or what the units for that would be. Also, any pointers in your code for where that calculation is done so that I might look at modifying it?

Thanks. I will keep looking myself and will add a post if I learn anything.

The PID takes care of the granularity piece for you. I think you would be better off putting your heaters in series and just let the PID take care of the rest. That project already has circulation built in so that's covered (and critical to accurate control).
 
As HeliBrewer (owner of the coolest avatar on the forum, btw) stated, there may be plenty of granularity In a discrete PID. It may even be that my proposal is equivalent to a binary discrete PID. My controls professor would hang his head that I can no longer demonstrate the truth of this assertion. My guess--some engineer I am, guessing--is that once the system is near the set point, the smaller increment of power will reduce error by giving the controller a smaller power increment to use. The controller won't have to wait to the beginning of a window to turn on 1200W, it can turn on 300. I have not even convinced myself here that the same thing cannot be done with a different integral constant. I need to figure out the math. Regardless, I may modify the code to see how it works anyway. That is the fun of being a home brewer, after all.

For background, the digital PID implementation--where there are only two input levels, off and on--uses a time window over which the controller modulates "on-time" to achieve an average power that is less than the instantaneous power output of the controller. For instance, if the controller calculated a 100W input signal, had a 300W heater available and the controller used a 5 second time window, the controller would turn the heater on for 1.67 seconds of that window. That code is at line 722 of Teensypipiddebug.ino (https://github.com/jimmayhugh/TeensyPi/blob/master/TeensyPiPidDebug.ino). The logic looks like this:

If (PID_OUTPUT) > (TIME_SINCE_WINDOW_STARTED)
Control_pin = ON
Else Control_pin = OFF

So if the output of the PID algoithm--the control signal, with units of time here--is greater than the controller's temporal position within the time window, it turns the heater on. Once the position in the time widow passes the calculated output value, the PID controller turns the switch off. The conversion factors from temperature (the set point unit) to time are rolled into the PID parameters (proportional term, I believe). I propose modifying it to look like this:
If (PID_OUTPUT) >4*(TIME_SINCE_WINDOW_STARTED)
Control_pin_4 = ON
Else Control_pin_4 = OFF
If (PID_OUTPUT) >3*(TIME_SINCE_WINDOW_STARTED)
Control_pin_3 = ON
Else Control_pin_3 = OFF
If (PID_OUTPUT) >2*(TIME_SINCE_WINDOW_STARTED)
Control_pin_2 = ON
Else Control_pin_2 = OFF
If (PID_OUTPUT) >(TIME_SINCE_WINDOW_STARTED)
Control_pin_1 = ON
Else Control_pin_1 = OFF

Obviously the php interface pages on the RPi would need a different mode as well, but that's down the road. I'm waiting on my new soldering tip to start building the Tpi boards.

Thoughts? I've probably just written a decent digital controls exam question. Clearly I would fail that class, as I nearly did 15 years ago.
 
The PID checks can run as quickly as the machine can process them, but this obviously isn't the entire logic in the TeensyPi sketch. Before each time it runs through the logic I've shown, the PID output is updated with the current temperature measurement. If the output is updated to an input signal that is less than than the current signal or the current position in the time window passes a constant output value < 100% of the time window (Jim uses 5 seconds in the Teensy Pi code), the switch (in the standard PUD algorithm, like Jim's) simply turns off. My algorithm is an attempt to use four levels of input signal within the time window.
 
Does anyone have any completed pictures? Im a little confused on where people are connecting the 18B20 and 2406.
 
Teensypi.com has pictures of most of the connections. Beyond that, I will endeavor to post photos as I build. After two weeks awaiting the arrival of my small soldering tip from RTE Scientific, it finally arrived. On it now!
 
That would be awesome. I work on computers and networks for a living so Im not a complete noob haha. I understand the MS paint diagram but not the idea of how people are connecting that to the board.
 
Brewed animal, the "building a teesnypi board" page has the following at the bottom:

The sensors and switches are connected to the terminal blocks located to the right of the above photo, from bottom to top respectively, the connections are GND, DATA, 3v3, and 5v. Wiring instructions for the digital thermometers are here, and the digital switches are here.

My understanding is the the "mini-LAN" allows you to chain the sensors and switches, so just one 3v3, god and data connection. I'm not there yet but will be soon, hopefully.
 
Here's a photo of my current testbed for my new board, the TeensyNet

TestSetups.png


The board on the left is the TeensyNet board and the 4 Action boards on the right are connected to the one-wire mini-lan via short wires. The TeensyNet uses only 5v, Data, and Gnd.

Each action board has 2 DS2406 switches, and one or more DS18B20 digital thermometers attached to the terminal block at the bottom of the action boards.

The topology looks something like this:
OneWireTopology.png


Hope this helps.
 
PJRC has just announced the release of their new Teensy 3.1 board.

The good news is that it's 50% faster, has quadruple the RAM (64K), twice the Flash Program memory (256K), and is pin and software compatible with the Teensy 3.0 board, so it's a drop-in replacement.

The bad news is that it costs $0.80 more than the Teensy 3.0 :rockin:

This adds a LOT more capability to the TeensyPi and TeensyNet boards.

More to come...
 
jimmayhugh said:
PJRC has just announced the release of their new Teensy 3.1 board. The good news is that it's 50% faster, has quadruple the RAM (64K), twice the Flash Program memory (256K), and is pin and software compatible with the Teensy 3.0 board, so it's a drop-in replacement. The bad news is that it costs $0.80 more than the Teensy 3.0 :rockin: This adds a LOT more capability to the TeensyPi and TeensyNet boards. More to come...

I can't wait, I ordered one :)
 
So I found this while surfing the app store (Apple). It's called RaspiConnect and there is also ArduinoConnect. This iDevice app allows connection to RaspberryPi(s) and/or ANY Arduino-based device and allows you to build a customized virtual control panel on your iDevice.

It's Python-based so it looks to be a very simple port from the current TeensyPi efforts. There is a library of supplied widgets that custom python can be written for to pull virtually anything from the Pi and/or Arduino.

Here: http://www2.milocreek.com:8080/
 
Subscribed.

Let me know if you need a Beta Tester for the technically Diminished.

Im more of the strong back type but i have a RPI and looking forward to helping out however.

Rock Chalk

Chris
 
Been away for a while, but have been using the Teensy setup for multiple projects. Currently building a semi-automatic keg washer that uses the switches to open solenoid valves. Right now I have programs/actions built in the MySQL database, load them via a PHP front end, and Javascript to run through the actions/timers.

Some screenshots:
Main Panel - http://i.imgur.com/83aNnDF.png
Switch Page - http://i.imgur.com/UThFWj3.png
Program Settings - http://i.imgur.com/dqGvX7e.png
Action Settings - http://i.imgur.com/hFR9Syc.png
System Overlay - http://i.imgur.com/vn94C4q.png

Build Pictures:
Internals - http://i.imgur.com/xtcvQbK.jpg
Valves - http://i.imgur.com/TaiC6Xi.jpg

Couple of issues I am running into are the reliability of the Javascript as the front end, and the risk of concurrent sessions messing up the actions.

I started looking into Node.js and Socket.io which allows you to run Javascript on the server and create a websocket to update the client side. This would solve the multiple sessions. There is also a serial-port module for Node.js that allows you to connect to devices like the Teensy. I am a little raw with sockets/serial, I have been able to connect to the Teensy and send the command to get the statuses of the chip but that's as far as I've gotten.

Node Console Log - http://i.imgur.com/4sFR5XB.png - The first switch is on, the rest are off.

The other issue is when I connect it appears to mess up the socket the standard Teensy software is using.

I'm sure there is a better method through something like a Python script, but I am pretty familiar with Javscript/JQuery so I thought I would give it a shot.
 
Jimmay, if you have some time do you think you could explain a bit how the serial communication works w/ the TeensyPi.

I have been trying to dissect the makeasocket.php and understand that part of sending the various commands and the TeensyPi will run the 'softserialprocess' based on the command received. Are you using WiringPi for the communication?

With Node.JS, when I send the GetAllStatus command "7/n" the results are not always the same, I'm not sure if it is the serial communication or some other issue.

This is a sample of what I am testing, basically I click a button on the client side that sends a "tstart" signal to the server to have it run the serialPort command. It will then return the results in the console log.

Code:
socket.on('tstart', function (data) {
      var serialPort = new SerialPort("/dev/ttyAMA0", {
  baudrate: 115200,
  buffersize: 2048
}); 
      serialPort.on("open", function () {
        console.log('open');
        serialPort.on('data', function(data) {
          console.log('data received: ' + data);
        });
        serialPort.write("7\n",function () {
          serialPort.on('data', function(data) {
          console.log('data received: ' + data);
        });
        });
        
      });

This results in various returns (I have Switch2 & Switch4 on and the rest off):
Code:
data received: F,F,N,F,N,F,F,F,F,F,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z


data received: F,F,N,F,N,F,F,F,F,F,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z


data received: F,F,N,F,N,F,F,F,
data received: F,F,N,F,N,F,F,F,
data received: F,F,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z


data received: F,F,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z

second time:
Code:
open
data received: N,F,F,F,F,F,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z

F,F,N,F
data received: N,F,F,F,F,F,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z

F,F,N,F
data received: ,N,F,F,F,F,F,Z,Z,Z,Z,Z,Z
data received: ,N,F,F,F,F,F,Z,Z,Z,Z,Z,Z
data received: ,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z


data received: ,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z
 
It's been a while since I've looked at the TeensyPi code, as I've been working on the TeensyNet, which I'm using for all of my monitors/controls. I don't have a TeensyPi running right now, so this is all from memory.

I use the teensypi_daemon to monitor the socket file, and transmit / receive data between the Teensy / RPi. The teensypi_daemon monitors one of the Teensy's pins (Digital 8, as I recall) to determine whether the Teensy is ready to receive data, and only transmits when it's safe to do so.

It looks like your code is bypassing the teensypi_daemon, and writing directly to the serial port, causing the buffer over and under runs.

As I recall, the wiringPi code was used to control the 4x20 LCD's using the RPi's I2C lines.

I'm pretty sure I included the teensypi_daemon.c code in the RPi image.

Hope this helps
 
While I like the TeensyPi, I'm going to be concentrating the majority of my future efforts on the TeensyNet Project, as I think it has a wider appeal and usability.

I'll still be available to help folks that are interested in the TeensyPi, but it might take longer for me to research and answer questions, since I'll have to access my archives and failing memory :drunk:

I'm also looking into the possibility of converting a TeensyPi board into a TeensyNet board with the help of a few add-ons. If it works out, I'll post an update here.

I'd like to give a big thanks to all that participated in the thread. :rockin:
 
old thread bump!

tried to build one of these for the lols. can't for the life of me even get the bloody web page to load ha!

just sits there loading, in the process of stopping apache the page then loads but of course starting apache again i can no longer load it.

pretty odd! anyway was fun busting out my soldering iron after a long time in the cupboard. will keep at it so i can learn about it all.
 
Back
Top