- Take Pictures with a TI-84+CSE and a Gameboy Camera
- 14 Nov 2014 06:47:43 pm
- Last edited by KermMartian on 28 Nov 2014 01:39:19 pm; edited 1 time in total
Edit: This project has been completed. It has been documented as the ArTICam project and announced in a news article.
Prompted by an offhand joke on Cemetech's IRC channel on Wednesday, I set out to connect a camera to my graphing calculator. Several years ago, Cemetech administrator Shaun "Merthsoft" McFall and I purchased Gameboy cameras on eBay for a few dollars, hoping to use them for some sort of calculator project. Now, with the ArTICL TI Calculator-Arduino linking library rapidly maturing, I decided the time was ripe to turn my gaze once again to this project. Unfortunately, because the camera required about 8 digital GPIO pins and one analog pin to communicate with its host, I couldn't connect the camera directly to the calculator. I therefore turned to my Arduino and ArTICL to solve the problem.
Thus far, I have been able to use ArTICL together with an open-source AVR + Gameboy Camera library to control and fetch images from the Gameboy camera. Small connection issues unfortunately prevent me from yet having images to show you guys, but the camera and calculator are communicating, and because I can use something as simple as GetCalc(Pic1 to fetch a color pictures to my TI-84 Plus C Silver Edition, there is absolutely no calculator-side software required. The ArTICL library instructs the camera to begin taking a photograph when the REQ (request for variable) message the calculator sends as part of the GetCalc( command arrives, then fetches the pixels one-by-one from the camera while sending them out over the I/O port to the calculator. Implementing this required integrating a new mode into ArTICL, where a callback is used to fetch the bytes to send over the wire on-the-fly. Previously, all messages were buffered before sending, but a 265x165-pixel TI-84+CSE picture takes up nearly 22KB, even with two pixels packed into every byte, so the Arduino's 2KB of RAM was far, far too small to buffer the image.
I look forward to adding further updates to this topic as this (admittedly quick) project progress, and as I have on-calc 128x128-pixel, 6-level-grayscale photographs to show.
Prompted by an offhand joke on Cemetech's IRC channel on Wednesday, I set out to connect a camera to my graphing calculator. Several years ago, Cemetech administrator Shaun "Merthsoft" McFall and I purchased Gameboy cameras on eBay for a few dollars, hoping to use them for some sort of calculator project. Now, with the ArTICL TI Calculator-Arduino linking library rapidly maturing, I decided the time was ripe to turn my gaze once again to this project. Unfortunately, because the camera required about 8 digital GPIO pins and one analog pin to communicate with its host, I couldn't connect the camera directly to the calculator. I therefore turned to my Arduino and ArTICL to solve the problem.
Thus far, I have been able to use ArTICL together with an open-source AVR + Gameboy Camera library to control and fetch images from the Gameboy camera. Small connection issues unfortunately prevent me from yet having images to show you guys, but the camera and calculator are communicating, and because I can use something as simple as GetCalc(Pic1 to fetch a color pictures to my TI-84 Plus C Silver Edition, there is absolutely no calculator-side software required. The ArTICL library instructs the camera to begin taking a photograph when the REQ (request for variable) message the calculator sends as part of the GetCalc( command arrives, then fetches the pixels one-by-one from the camera while sending them out over the I/O port to the calculator. Implementing this required integrating a new mode into ArTICL, where a callback is used to fetch the bytes to send over the wire on-the-fly. Previously, all messages were buffered before sending, but a 265x165-pixel TI-84+CSE picture takes up nearly 22KB, even with two pixels packed into every byte, so the Arduino's 2KB of RAM was far, far too small to buffer the image.
I look forward to adding further updates to this topic as this (admittedly quick) project progress, and as I have on-calc 128x128-pixel, 6-level-grayscale photographs to show.
![](http://www.cemetech.net/img/projects/ee/articl_gbacam1.jpg)