I2c display for Martin s S/C Tx

Button pushers
chlluk
Posts: 87
Joined: 19 Feb 2018, 15:38

I2c display for Martin s S/C Tx

Post by chlluk »

Hi
Does anyone have the necessary script changes to allow Martin s single channel Tx to us an I2c display
Clive
Martin
Posts: 745
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: I2c display for Martin s Tx

Post by Martin »

Do you mean still using a 16x2 LCD but with an I2C adapter to drive it, or do you want to use some different kind of display?
chlluk
Posts: 87
Joined: 19 Feb 2018, 15:38

Re: I2c display for Martin s Tx

Post by chlluk »

Hi Martin
Yes the same small display. Think they use A4 A5 pins plus a new library.
Clive
Martin
Posts: 745
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: I2c display for Martin s Tx

Post by Martin »

Hi Clive, you mean the little oled displays like I used on the 2.4GHz scanner and 'Reedy Ten' projects?

Image

I could alter the sketch to use those, but beware that we found on the Reedy Ten project that these modules tend to be practically invisible outdoors on a sunny day. I think the original 16x2 character LCD displays are much better for transmitter use - though, of course, not so compact.

Has anyone discovered an 'outdoor (sunlight) I2C oled display module'?

I've got one of the Sharp Memory Display modules - this looks like an LCD - it's not backlit and can't be seen in the dark. It's only slightly larger than the oled modules. It does work great outdoors, but is currently only available from one or two suppliers and is rather expensive.
belli
Posts: 39
Joined: 19 Feb 2018, 19:19

Re: I2c display for Martin s Tx

Post by belli »

I never thought the sun shone that brightly in the UK, I thought reading them in the rain would have been more of a concern...
chlluk
Posts: 87
Joined: 19 Feb 2018, 15:38

Re: I2c display for Martin s Tx

Post by chlluk »

Hi Martin
No just the 16x2 LCD display but with the I2c interface.
Clive
Martin
Posts: 745
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: I2c display for Martin s Tx

Post by Martin »

I've attached an I2C version that works with a 16x2 LCD display that has an I2C piggy-back board with the label FC-113. Different I2C boards have different addresses and different orders for the pin-out from the 12C chip on the board to the LCD module, so you may need to edit one line of the sketch to suit your I2C - see below.

Make a folder named SingleChannelTx in your Arduino sketches folder and unzip the files into there.

You need to download the Newliquidcrystal library from here https://bitbucket.org/fmalpartida/new-l ... downloads/

Get the latest version which was 1.3.5 at the time of writing. I've also attached that version to this post in case the original version ever disappears.

Put the folder from the download inside your Arduino libraries folder. You can leave the folder with its original name of Newliquidcrystal_1.3.5 or rename it to LiquidCrystal_I2C or similar. The name of the folder doesn't matter as long as it doesn't clash with the standard library names: if the name does clash, then the IDE will keep bugging you to update it - and if you do update it, you'll lose the I2C functionality that you need.

The line that you'll probably need to edit to get it working with your I2C LCD is this one:

LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

If your I2C LCD is one of the more common types then you don't need the list of numbers (that specifies the pin order and whether the backlight pin has to be high or low to make the backlight, if fitted, operate).

But you do have to get the first number right, the I2C address. Common I2C addresses are 0x20 and 0x38. Mine happens to use 0x27.

So the line might be as simple as

LiquidCrystal_I2c lcd(0x20);

If you have some example code that came with your display and works, copy the address, and the pin order from there. If not you have to resort to googling and/or trial and error.

As attached, this version has a rotary encoder with the two encoder pins A0 and A1, and the push button of the rotary encoder to pin 10. A2 is the battery monitor (via potential divider).

You can't use the 'link A5 to GND' trick to reset the EEPROM, as A5 is being used as the SCL line for the I2C display. Easiest way to reset the eeprom, if you need to, is to load up the standard sketch and run that with A5 linked to GND - even though you won't have a working display the reset will still happen, and then you can reload this special I2C sketch afterwards. I could have used one of the now unused pins that used to drive the parallel LCD as a reset pin, but I've not bothered at the moment as I'm not sure how many people will ever want to use this version.
Attachments
Newliquidcrystal_1.3.5.zip
(2.26 MiB) Downloaded 185 times
singleChannelTx.zip
(26.21 KiB) Downloaded 206 times
Last edited by Martin on 10 Aug 2018, 11:14, edited 4 times in total.
chlluk
Posts: 87
Joined: 19 Feb 2018, 15:38

Re: I2c display for Martin s Tx

Post by chlluk »

Many thanks Martin.
Clive
chlluk
Posts: 87
Joined: 19 Feb 2018, 15:38

Re: I2c display for Martin s Tx

Post by chlluk »

Would the reset button mounted on the NANO serve as a reset is is that a different form of reset
Clive
chlluk
Posts: 87
Joined: 19 Feb 2018, 15:38

Re: I2c display for Martin s Tx

Post by chlluk »

Works great thank you.
Clive
Post Reply