This Statement is False

4d OLED Arduino class

September 20, 2010 - 8:50 pm
four4oled class

I just re-wrote a driver for the 4d OLED screen. The driver was originally written by Jenny Chowdhury as a single header file. I took it and made it into a class. Not all the OLED commands have been incorporated, but the core functionality is there. You need to simple instantiate the fourdoled class with a rx and tx pin. Then use the OLED functions:

void OLED_ResetDisplay();
char OLED_GetResponse();
void OLED_Init();
int GetRGB(int red, int green, int blue);
void SetBgColor(int color);
void OLED_Clear();
void OLED_PutPixel(char x, char y, int color);
void OLED_DrawLine(char x1, char y1, char x2, char y2, int color);
void OLED_DrawRectangle(char x, char y, char width, char height, char filled, int color);
void OLED_DrawCircle(char x, char y, char radius, char filled, int color);
void OLED_SetFontSize(char FontType);
void OLED_DrawText(char column, char row, char font_size, char *mytext, int color);
void OLED_DrawSingleChar(char column, char row, char font_size, char MyChar, int color);

When the oled object is instantiated it will use hardware serial if setup on pins 0 and 1. Otherwise it uses the newSoftSerial library available from the Arduino site.

#include "NewSoftSerial.h"
#include "fourdoled.h"

fourdoled oled(4,5); ////setup as software serial
oled.OLED_Init();
oled.OLED_Clear();
oled.OLED_PutPixel(5,5,60000);
oled.OLED_DrawLine(0,0,50,50,60000);
oled.OLED_DrawText(0,0,0,"Tycon hello world", 60000);

I am sure there are a few bugs with it but it has worked fairly well for me. One note to save people some time is to use the String library from the Arduino site. I have found it is fairly flexible and I have less issues with data types when trying to print charecters etc.

Please let me know if you have and questions or comments
admin@tyconpowered.com

-0 comment(s) -



Timelapse

May 29, 2010 - 3:56 pm
Probably the best timelapse video I have seen

Get up and go from Stefan Werc on Vimeo.


-0 comment(s) -



Hutaree.com

March 29, 2010 - 7:31 pm
Tonight while watching the news I saw that the domestic terrorist group Hutaree was raid and many of the members arrested. The happened to show a bit of the groups website on the news. My attention was immediately drawn to the poorly tiled background image. It seems just when I thought the number of geocities era websites was dwindling, the hutaree are preserving history.

The quote on their homepage says "Preparing for the end time battles to keep the testimony of Jesus Christ alive". Apperentlly the testimony of Jesus Christ includes using tables and huge amounts of nbsp"s to position html elements. To their credit it looks like they coded the page from hand rather than use dreamweaver. That takes a certain level of HTML knowledge. At first I thought the page was some sort of lady gaga / Credence clear water revival fan site. But then I realized "poker face" is actually a wacko backwoods rocker and CCR is actually the "Colonial Christian Republic".

-0 comment(s) -



Landsat

November 24, 2009 - 12:40 am

This article from NASA takes a look at the Landsat project. It is interesting that computing power was the limiting factor at the time it was launched.
"Each Landsat image is several hundred Megabytes. Until recently, it would have taken a super computer to sort, join, and geolocate (map the latitude and longitude of) the thousands of images needed to make a global picture. “For decades, the computing challenge was huge,” says Masek."

-0 comment(s) -



Arduino and the micro-drive

November 20, 2009 - 5:53 pm
I have spent the last day connecting my new micro-drive from 4d systems to my Arduino. The chip allows you to access a file system on a micro-sd card from a micro controller such as the AVR. It will be a part of my weather station, and will be used to log data. Since the 168 only has one real serial port (which is used to program it) you need to use software serial. I just got it working and wanted to give a few pointers on some issues I had while doing this.

-Use the newsoftserial library. It is much better than the original software serial library. It can be found here

- Make sure your Arduino is outputting 3.3 volts on the digital pins not 5. I suggest the Seeduino, which allows you to change from 3.3 to 5 volts with the flick of a switch.

-Be sure you are using myserial.print(U, BYTE); and define U as int U = 0x55;. There are so many print options which print in different forms (HEX, BYTE, CHAR) it can get confusing.

Here is a shortprogram to test connecting to the micro-drive. Connect to the Arduino at 57600 and send c for connect l and for status. I am off to implement writing files.

-2 comment(s) -



Live Ship Traffic

November 8, 2009 - 10:12 pm
This site has live view of all maritime traffic currently in port or underway. The data comes from on board transponders which vessels are required to carry per the IMO.

-0 comment(s) -



MODIS image

November 8, 2009 - 9:49 pm
It is rare this time of year to get a cloud free day across all of North Eastern North America as we did today. Here is the image today from MODIS RRS.

MODIS is a set of two satellites used to gather daily images of almost the entire globe. You can view all the images here.

Aside from far northern Canada and a few dots on mountains higher than 5000 feet there is not much snow around, despite the few inches the region got 2 days ago.

-0 comment(s) -



Snow above the freezing point

November 5, 2009 - 8:31 pm
Almost everyone has seen it snow when the temperature is above freezing. Many times this is because the snow has not had time to melt as it falls through a warming temperature gradient. Of course this is not the case all the time. Many cars with an outdoor temperature sensor also have an ice warning. I noticed that in my car the ice warning comes on at different temperatures as warm as 42 degrees. I have always suspected it was related to the air humidity but was not exactly sure how. It turns out it depends on the humidity, and the air flow around the flakes, since evaporation takes energy and cools the flake. The lower the humidity the higher the melting point because of increased evaporative cooling. Of course this is somewhat rare since if there is any precipitation the humidity is generally high.

I found this cool calculator to find the probability of snow.
I also read one of the comments which was interesting. It said a "rule of thumb" is that it can snow if the average between the dew point and temperature is below freezing.

-0 comment(s) -



Side Wiki

October 29, 2009 - 12:05 am
I saw a post a while ago at http://www.dangerousminds.net/ that talked about Google side wiki and how it was going to be used to start a secret society. So I downloaded the google taskbar and tried it. I was saddened to find out there is no secret society, but it does seem very useful for at least one application. When designing websites it is often the case that the designers are trying to convey something about a very particular part of the site. It turns out side wiki is great for this. You can highlight a section of a page and make a comment. Definatlly going to try to use this on my next project.

-0 comment(s) -



Best Router I have owned

October 20, 2009 - 12:22 pm
I have owned about 7 routers in my life. Some have been better than others, but all seem to have some sort of issue. Most worked reasonably well but a high number of connections or high network traffic would crash them. Their setup interfaces were ok, but were slow and needed to be restarted even after the slightest change. I even tried installing custom firmware, which gave me new features but did not really improve performance.My new router, the TP-LINK TL-WR541G has been running without a reset or slowdown for about a month. Additionally it seems like you dont need to constantly reset it while making many changes to the settings. The remarkable thing is that it only costs 25 dollars! This actually almost turned me off to buying it. The box said TP link is the number one market share in China, and it turns out they make a number of other networking products.

-0 comment(s) -






Previous Entries >