Skip to main content

MERG Advert Display

 At last Sundays West of Scotland Area Group Meeting, I showed a MERG advert running on a 128 x 64 OLED display. One of their group contacted me to ask if that could work on the 128 x 32 station display which he had just ordered from me.

The original image is 290 x 115 pixels so this needs to be reduced with the aspect ratio maintained.
The original is also a colour image which we will also need to convert to run on a monochrome display.

Paint is a very basic program installed on most Windows machines but is perfect for what we need to do.

Open the original image in Paint and select Resize
The OLED display width is 128 pixels
By selecting the pixel radio button and typing 128 in the horizontal field and ensuring the maintain aspect ratio box is ticked, the picture is reduced to 128 x 50 , perfect for a 128 x 64 display.

For 128 x 32 we must instead select 32 in the vertical field which will produce a final image size of
81 x 32 pixels.

All that remains to do, is to save it as a monochrome bitmap.

To convert to Arduino Code you can use the free online image2cpp program

Select the image you have just converted. In the settings area, leave the background as white but check the invert colors tickbox.

In the output area, select Arduino Code - Single bitmap option

Press Generate Code.

The Code appears in the window below from where you can copy and paste into your Arduino Project.

If you would like to see the completed file, use the Contact Us form with your details and I can email the sketch to you. A video is attached of the display in action.

Potentially very useful for exhibitions IF we ever see them again

Andy R


Comments

  1. Cheers, works like a treat: Once I'd found the converter! https://javl.github.io/image2cpp/
    First search got me an Arduino sketch.

    ReplyDelete

Post a Comment

Popular posts from this blog

Train sequence / timetable using Arduino

                              Following discussions in a MERG Zoom meeting about potential projects for the Cumbria virtual area group I have started this blog to share my ideas for building a train sequence / timetable system based on an Arduino UNO. The trigger for this project was Andy Robb's article in the MERG journal (June 2020 edition). In it Andy describes using an UNO with a OLED display to produce an electronic station display board.  Having tried out Andy's version I started thinking about expanding the idea and have come up the following list of possibilities: 1. Replace my card index train sequence with an electronic version. 2. Have the train sequence synchronised with the on platform displays. 3. Display an analogue clock on the station display and have it display the train times. 4. Store the position reached in the sequence so that it starts where it left off on power up.  To mak...

Sunday's West of Scotland Area Group Zoom meeting

 Another very well attended Zoom meeting with 34 participants. Davy showed us the commercially available automatic train stopping unit available at £12.53 from Brimar and compared it with the almost identical PMP 15 kit from the MERG Kitlocker at  only £2.65.  With these kind of savings, MERG membership is worth every penny. Chic Thomson treated us to a very entertaining presentation on simulation software for Electronics. INKSCAPE  is a free open  source drawing package. There are many Arduino Simulators available but Arduino Simulator 1.5.1 is an excellent open source offering.  For those interested in PICs simulators are available within the JAL compiler (Just Another Language) and MPLAB Sim is available within MPLAB but seldom advertised. Electronics Workshop 5.1 is a program no longer being developed but a useful tool for investigating any electrical or electronic circuit. Apparently you can Google it but there are a few insecure sites so be careful. F...

Push button Ezypoints

 A few months ago I produced a batch of Ezypoint kits for our local members to overcome a shortage in the Kitlocker.  At that time the kit was produced on stripboard which some members find problematic. An additional PCB board normally available from MERG was not available either.  Alan Turner ( the PCB designer) had only a few boards available but graciously provided me with the gerber files to allow me to order PCBs directly from China . Having sourced all necessary components, the kits were duly made up. I find this simple kit is really useful for automation projects. A toggle switch provides either a HIGH or LOW on the PIC input pin to determine which of the two servo positions is selected. For a particular application, I wanted to use a push button to toggle the position on alternate presses of the button. This involved a rewrite of some of the code in the PIC. I initially developed the program using an Arduino as a means of testing the logic. When this was successfu...