I2c display for Martin s S/C Tx

Button pushers
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: I2c display for Martin s Tx

Post by Martin »

The 'reset' I mentioned just clears out the eeprom where the model memories are stored - it resets all the values to some reasonable defaults, and the model names to ' unused 1', ' unused 2' and so on. You don't really need it as you can always edit one model memory manually. If you're only flying one model then you're done, but there is also the option to copy the current model to a new 'slot' which allows you to quickly set up a new model without needing to edit all the values.
chlluk
Posts: 87
Joined: 19 Feb 2018, 15:38

Re: I2c display for Martin s S/C Tx

Post by chlluk »

Hi martin
Just about to start work on one of your single channel encoders. I want to use a rotary encoder but not sure how to connect it. There are some pdf files for download on the site but two of them are corrupted,can you help.
Clive
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: I2c display for Martin s S/C Tx

Post by Martin »

Hi Clive.

What sort of display are you intending to use? The Arduino sketch in this thread seems to be for the 16x2 LCD, with one of those I2C piggy-back boards to drive it. I seem to remember I also did a version that drives the 16x2 LCD directly, via its multi-wire 'parallel' interface, and maybe I did a version for the small OLED displays? (If not, I could easily port it to those, but they do have the disadvantage of not being very visible in bright outdoor conditions).

Can you point me to the corrupt pdf files? Once I know what I'm looking for, I may be able to unearth some intact ones.

You may be able to manage without the pdfs - the code contains some snippets of connection details in the comments. There's a bit of "documentation" in the encoder.h file of the sketch:

Code: Select all

// rotary encoder.  Three pins one end connected to A0,GND,A1.  swap outer two to reverse direction of counting  
// Two pins other end connected to D10,GND - this is the momentary 'push' switch built into the encoder
There's also an ENCODER_COUNTS_PER_CLICK constant you can alter in that file, if your encoder seems to react too fast or too slow.

Most rotary encoders have 3 pins at one end, two at the other. They also have one larger 'pin' each side - but those two are just for mechanical mounting of the encoder to a PCB,

On the three pin end, the centre one connects to GND and the outer two to A0 and A1. Reverse A0 and A1 if you have to turn the encoder the opposite direction to what seems natural.

From the two pin end, the pins connect to GND and D10. Doesn't matter which way round, because it's just a momentary contact switch when the knob of the encoder is pushed down.
chlluk
Posts: 87
Joined: 19 Feb 2018, 15:38

Re: I2c display for Martin s S/C Tx

Post by chlluk »

singlechanneltxr2brd and singlechanneltxr2sch.
Thanks for comming back to me on this.
Sort of housebound and need to build stuff to keep me sane. I will be using the diy more pro mini strong for this one. Have the ppm output to D0.
I have a I2c LCD display,need to know where to plug it in. Have put the updated display library into the Arduino IDE and the script compiles fine. Have send code to controller and all seems well at this point. also need to know where the encoder connects to.
Regards
Clive
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: I2c display for Martin s S/C Tx

Post by Martin »

Okay. Sounds good. When you say 'encoder' you mean the rotary encoder for navigating the menus or something else? If you're talking about the rotary encoder, the connection details are in my post, above.

The I2C interface for the LCD display, connects to VCC and GND to get its power (and power the LCD) the two signal wires connect to the Arduino's A4 and A5 pins: A4 is SDA and A5 is SCL,
chlluk
Posts: 87
Joined: 19 Feb 2018, 15:38

Re: I2c display for Martin s S/C Tx

Post by chlluk »

Thats great,i can make progress now.
Thank you for the help.
Clive
chlluk
Posts: 87
Joined: 19 Feb 2018, 15:38

Re: I2c display for Martin s S/C Tx

Post by chlluk »

Things moving along well. Reading the instructions for first start up it tells me to put a jumper on A5 for the calibration cycle.
The i2c lcd display uses A5.
Clive
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: I2c display for Martin s S/C Tx

Post by Martin »

You don't really need the calibration cycle if you're building a version for the rotary encoder.

The calibration cycle was necessary for the analogue joystick version - it remembered the travel limits of the joystick and its centre position, and stored those values in the eeprom.

The calibration cycle also set some default values for the model memories - setting all the model names to 'Unused', and similar.

But you can do that yourself once the transmitter is working - and it's a good way to get used to the menus. Just set up the first model memory with some sensible values, and then use the 'copy model' menu option to copy those same settings to the other 26 model memories.

Of course, if you only intend to ever use one or a few of the model memories, then there's no need to initialize all 27.
chlluk
Posts: 87
Joined: 19 Feb 2018, 15:38

Re: I2c display for Martin s S/C Tx

Post by chlluk »

Ok no problems.
Will add an rf unit and a rotary encoder and see how we get on. Its ok me using D0 for ppm i suppose,it just makes power and data cable neat on these pro mini strong boards.
Clive
chlluk
Posts: 87
Joined: 19 Feb 2018, 15:38

Re: I2c display for Martin s S/C Tx

Post by chlluk »

Hi martin
Working on through the project i have fitted all the externals except for rotary encoder. Have put momentary button on D10 while waiting fir encoder to arrive. Have added rf unit data on D10. Have powered up the unit and display works well however no data to rf unit and buzzer is on continious beep. Tried pressing button on D10 no change.
Any ideas.
Clive
Post Reply