So this took me longer to put together than expected as various events in my life have kept me very busy, in a good way. I also had trouble with the tool Fritzing. It is the tool I used in Part 1 of this tutorial to create the image of the breadboard and Arduino laid out nicely. I had trouble building my own Nintendo DS Touchscreen Connector and the Touchscreen itself. There were Spark Fun equals but they were not exactly the same and I didn’t want to confuse anybody by accident.
Due to this tutorial taking too long I’m just going to show a few images of the device along with the code. I apologize the lack of a proper tutorial.
#define RED 11
#define GREEN 10
#define BLUE 9
int y1 = A0;
int x2 = A1;
int y2 = 7;
int x1 = 6;
TouchScreen ts = TouchScreen(x1, y1, x2, y2, 10000);
float clamp(float value)
value *= 255.0f;
if (value > 255.0f)
value = 255.0f;
else if (value < 0.0f)
value = 0.0f;
return 255.0f - value;
Point touchedPoint = ts.getPoint();
if (touchedPoint.z > ts.pressureThreshhold)
float X = touchedPoint.x / 1023.0f;
float Y = touchedPoint.y / 1023.0f;
float Z = 1.0f - x - y;
float r = X * 1.4628067f - Y * 0.1840623f - Z * 0.2743606f;
float g = -X * 0.5217933f + Y * 1.4472381f + Z * 0.0677227f;
float b = X * 0.0349342f - Y * 0.0968930f + Z * 1.2884099f;
r = r <= 0.0031308f ? 12.92f * r : (1.0f + 0.055f) * pow(r, (1.0f / 2.4f)) - 0.055f;
g = g <= 0.0031308f ? 12.92f * g : (1.0f + 0.055f) * pow(g, (1.0f / 2.4f)) - 0.055f;
b = b <= 0.0031308f ? 12.92f * b : (1.0f + 0.055f) * pow(b, (1.0f / 2.4f)) - 0.055f;
r = clamp(r);
g = clamp(g);
b = clamp(b);
I figured I’d write-up a tutorial on a little idea I had. I wanted to see if I could make a touchscreen become a color picker. Simple idea and I know it is possible. It was a good introduction into various aspects of building prototypes with an Arduino board. This tutorial is going to be broken up into two parts. First we’ll talk about hooking up an RGB LED to an Arduino board. I’ll be using an Arduino UNO but I’m sure most of the Arduino boards will be very similar. One last thing, keep in mind I am new to embedded development and hardware in general. So these tutorials may not be as descriptive or detailed as one would expect.
Continue reading “Part 1: Nintendo DS Touchscreen Color Picker”
I’ve recently joined a local Maker’s Space group where I live and I’ve been diving a little bit into electronics. This is a new world for me as I have always purposely stayed away from hardware. I found my love with software but always felt hardware was more of a chore. I just didn’t enjoy it. So I left it to those that do enjoy the hardware world.
Continue reading “Getting Into Hardware”
I love Apple’s services and I love to embrace them as much as I can. However, they definitely are not without their own issues. File storage is an interesting one with iCloud. With many of the file sharing and storage cloud based services out there we are presented with a typical file system structure. Drop all your folders/files into one folder and it’ll sync across all your devices that use the same service. You browse your files and open a file with whatever appropriate software you have installed to view the file.
Continue reading “Problem With iCloud”
Yes, you read that correctly. iFriends. More specifically I need more friends or people I know using iPhones. Better yet, Apple needs to open up and build applications for people to take advantage of the several services they offer. I’m tired of having an empty iMessages history. Tired of only having one friend who can use FaceTime with me. I’m tired of having no one to share photo streams with. Apple offers amazing services, but unless you and your circle of friends and family own Apple products you really don’t get to use these amazing services.
Continue reading “I Need More iFriends”