27
Jul 15

OLED from BuyDisplay.com – Mat’s Hookup Guide

Here’s a quick hookup guide and sketch to get the ER-OLEDM032-1W display to work with Arduino. We are going to use the u8g library to drive the OLED.

The ER-OLEDM032-1W is a 256×64 graphic OLED module costing $26.56. White on black. I bought mine from eBay although the Chinese brand BuyDisplay.com sells them directly.

serial_oled_module_price_3.2_display_256x64_screens_white_on_black

There are two versions of the display, one including the integrated PCB (above) and one without. We want the above one, with integrated PCB. Make sure you purchase the one with the M in the part number.

Here’s a link to the data sheet.

About the part number:

  • ER stands for “East Rising” the manufacturer
  • OLED stands for OLED: “organic light emitting diode”
  • The M stands for “module”. I think. They do two versions, the one with driver board (adapter board) which is this one, and one without the driver board which doesn’t have that M. Confusingly they call the one without a driver board module an OLED module as well. Either I’m wrong or their naming convention is confusing. Or both. Either way you probably want the one with the M, it has an integrated PCB.
  • The 032 stands for 3.2 inch, corner to corner
  • Not sure what the 1 stands for, they all seem to have it
  • The W stands for white, they have other colours (yellow, green blue)

To use the display with u8g library and Arduino you must swap the tiny resistor on the back in position R18 to the position R19. Do this with a steady hand, some really good tweezers and a soldering iron.

ER-OLEDM032-1W Display hookup
swap 0 ohm resistor from R18 to R19 on rear of display
1> gnd
2> 3.3 OR 5 ok
4> level conv – arduino 4 (clock)
5> level conv – arduino 5 (data)
7-13> gnd
14> level conv – arduino 7 (command data select i.e. D/S)
15> reset – this needs to be connected to +5v
16> level conv – arduino 6 (chip select)

For the level converter I used this very cheap module, a clone of something by Adafruit: http://www.ebay.co.uk/itm/Pop-IIC-I2C-Logic-Level-Converter-Bi-Directional-Module-5V-to-3-3V-For-Arduino-/381311755120?hash=item58c7f3a370

And here’s a sketch. I ripped this from a larger sketch I have been working on and haven’t tested it, but it should all be about right.

#include "U8glib.h"

#define oledClock 4 // OLED
#define oledData 5 // OLED
#define chipSelect 6 // OLED
#define commandDataSelect 7 // OLED

U8GLIB_NHD31OLED_2X_GR u8g(oledClock, oledData, chipSelect, commandDataSelect);

void setup()
{
// Setup U8G
if ( u8g.getMode() == U8G_MODE_R3G3B2 ) u8g.setColorIndex(255); // white
else if ( u8g.getMode() == U8G_MODE_GRAY2BIT ) u8g.setColorIndex(3); // max intensity
else if ( u8g.getMode() == U8G_MODE_BW ) u8g.setColorIndex(1); // pixel on
else if ( u8g.getMode() == U8G_MODE_HICOLOR ) u8g.setHiColorByRGB(255,255,255);

....

}

/******************************************/
/* CONTROL DRAWING */
/* --------------- */
/******************************************/
void drawControl(void) {

** insert logic to draw different things here, e.g. as follows **

// Draw current room light level
if (showlightlevel == 1) {
u8g.setFont(u8g_font_6x10);
u8g.drawStr(178, 30, "Currently");
if (lux < 20) {
sprintf (buff, "%i%s", lux, " (dark)");
} else if (lux < 100) {
sprintf (buff, "%i%s", lux, " (med dark)");
} else if (lux < 400) {
sprintf (buff, "%i%s", lux, " (med bright)");
} else if (lux < 10000) {
sprintf (buff, "%i%s", lux, " (bright)");
}
u8g.drawStr(178, 40, buff);
}
}

void loop()
{
u8g.firstPage(); // START U8G
do { // START U8G
drawControl(); // START U8G

** insert the rest of your sketch that does stuff **

} // END U8G
while( u8g.nextPage() ); // END U8G
}

10
Jul 15

From Russia With Cash – barking up the wrong tree

I have no links with estate agents in my life. I don’t like them, I don’t dislike them. As a portrait photographer or in any other capacity, I’ve never had one as a client myself.

Channel 4 last night aired a documentary called “From Russia With Cash”.

It featured secretly-filmed property viewings by a fictional character called Boris who stole money from the Russian government and tried to buy a multi-million pound property for his blonde mistress. Estate agents from the following firms were filmed: Winkworth, Marsh and Parsons, Domus Nova, Chard, Bective Leslie Marsh.

A sexy title, and a very exciting premise for someone like me who cares deeply about the housing crisis we are facing in the UK, specifically the abnormal levels of investment that are seen to push-out genuine buyers (not just financial investment buyers) who want to make their homes in London.

The buyers I’m talking about want to live here perhaps because they want to be near family, perhaps because their job brings them here, or perhaps they have lived here all their lives and want to settle – to live in a property they own. Or maybe they just want a piece of London if they can possibly afford it. We all know they probably can’t.

Within 10 minutes of watching it became apparent the premise of the documentary was flawed. It was aimed squarely at exposing the inherent corruption in the estate agency business. Or so I thought.

Whilst the estate agents in question hardly showed visible outrage or shock on their faces when the fictional buyer looking around said he would be using stolen money, neither did they show any evidence whatsoever of wrongdoing. Read on – I’m not playing ball from estate agents. I’ve no reason to. The reason I’m angry by this documentary is that it was a great opportunity to properly explore and expose the real problems in the industry as a whole. Or indeed in problems with the housing market itself.

The documentary was punctuated by snippets from QCs who spoke hypothetically and said nothing that was untrue, and nothing one might disagree with. There were other narrators who said things such as “just plain wrong” without going into any detail as to why these secretly-filmed agents were wrong. Indeed the after-game statements from the agents themselves were very strong indeed and in my opinion almost completely vindicated their behaviours.

Most of the estate agents came right out and said words to the effect that they were not qualified to advise on issues of money laundering. Some of the estate agents went on to say that this would be done according to the law by legal professionals once the transaction proceeds.

True, some of them said “you will need a good lawyer, I can recommend one”. But does this really class as unethical?

Estate agents are low hanging fruit.

All this documentary showed was that estate agents essentially smiled and nodded during the viewings. There was not a jot of evidence to suggest the agents even considered the viewings to be credible let alone that they might end in a transaction. Of course they didn’t close it off – they are hoping for a sale. That’s what an estate agent does. Should they have laughed out loud at fictional “Boris” and said “no way mate, we aren’t going to help you”? Indeed if they had thought he was credible, what’s to say he didn’t have a car full of Russian men with guns waiting around the corner? A silly suggestion, but my point is that of course the estate agents smiled and nodded. I would too. It was a charade.

Did the secretly recorded conversations on the phone with the fictional character’s agent show any unlawful or wrong behaviour? What I heard were agents explaining that at this stage they wouldn’t be asking questions.

I’m really gutted that Channel 4 have totally missed the point with this. There was nothing to suggest that money laundering law was broken, as explained by a number of the statements given by the estate agents after being contacted for comment. Amusingly Channel 4 chose to show these perfectly reasonable statements in black and white – the irony.

Domus Nova stated “No offer was made and therefore no transaction was in prospect.”

They said “we recorded the viewing on our AML [anti money laundering] log despite not having any ID information from the fake buyer and requested that an offer was made through solicitors registered in England and Wales.”

Sorry Channel 4 – I’m with Domus Nova on that one!

Another agent stated that they have a regulatory duty to perform anti money laundering procedure on the seller with whom they have a relationship, but not a potential buyer who hasn’t even made a formal offer. Just someone fictional who shot the breeze.

Channel 4 – you used to make groundbreaking documentaries. This was far from interesting let alone groundbreaking.

Never let facts get in the way of a good story, that’s what I say.

Again I say, I’ve no reason to defend the profession of estate agents. Again I say: I don’t have a single estate agent friend nor do I have any business connections with estate agents. I am an active campaigner in local community group issues and the hyperlocal movement, and wholeheartedly support the #ReclaimLondon movement.

The reason I’m annoyed by this is that this television programme only served to divert discussion away from the issues that face real London wannabe homeowners.