Programming

Arduino encoder library

Posted in Cockpit build, Programming on October 18th, 2014 by trenck – Comments Off

Encoder library is published by pjrc


The code

#include "Encoder.h"

 Encoder encoder(2, 4);

 void setup() {
 attachInterrupt(0, doEncoder, CHANGE);
 Serial.begin (115200);
 Serial.println("start");
 } 

 void loop(){
 // do some stuff here - the joy of interrupts is

read more »

MQTT on Arduino Mega 2560 and enc28j60 network module

Posted in Cockpit build, Programming on October 18th, 2014 by trenck – Comments Off


Cabling

ENC CS -> Arduino SS (pin 53)
ENC SI -> Arduino MOSI (pin 51)
ENC SO -> Arduino MISO (pin 50)
ENC SCK -> Arduino SCK (pin 52)
ENC GND -> Arduino GND

read more »

Howto access and publish addon specific variables with FSUIPC

Posted in Cockpit build, Programming on August 1st, 2014 by trenck – Comments Off

Flight Simulator addons often have specific internal variables that are not published in FSUIPC standard offsets. These values could be interresting for cockpit building. For example, A2A P47 addon does not publish turbo RPM value, but this parameter is essential…

read more »

Reading Rotary Encoder

Posted in MicroPanel, Programming on May 18th, 2012 by trenck – Comments Off

The XOR logical table can help with reading and computing rotary encoder output.

Rotary encoder has 2 outputs, that returns a state, using “grey” code. When encoder turns un Clockwise(CW), outputs are 01,00,10,11 and Counter Clockwise(CCW) outputs are 01,11,10,00.

read more »

Access Variables/Property tree in FS,FlightGear and XPlane

Posted in MicroPanel, OnePanel, Programming on February 15th, 2011 by trenck – Comments Off


How to talk with your simulator ?

Add-ons developper or cockpit builders have to access flight simulator variables, to mange or display them. If coding is not your cup of tea, you can use OpenCockpit software for example, a…

read more »

UBW technical notes

Posted in MicroPanel, Programming on January 2nd, 2011 by trenck – Comments Off

Today is a great day ! You just receive your UBW32 board from Sparkfun. Unfortunately, no documentation is provided…
No problem, having a look at schmalzhaus website will help us to discover this card.


Circuit footprint

read more »

IOCard programming

Posted in OnePanel, Programming on January 1st, 2011 by trenck – Comments Off

IOcard is directly connected to PC parallel port, using a standard DB25 cable. IOcard consist on a network of multiplexed addressable latches. Programming is done by controlling parallel port signals.
PPORT_BASE is parallel port base address (0×378 for parallel…

read more »

Test driven programming

Posted in Programming on December 5th, 2010 by trenck – Comments Off

Test driven programming is a base of Extreme Programming.
But this could be a good practice for any method…


What is test driven programming ?

A strict methodology shall be applied:

  • Write a test that fails (ie

read more »

BCD/decimal conversion

Posted in Programming on December 5th, 2010 by trenck – Be the first to comment

As Flight Simulator published radio freqencies in BCD, it is necessary to convert them before computing frequency change.

Note: frequencies are not fully published in BCD. For example, for COM frequencies (VHF freq), the initial “1″ is not published, the…

read more »