Release 2016.8.2 / Update 2017.11.1

AR-FOCUS arduino sketch

‘AR-FOCUS’ has volume over 30KB. Sketch size has reached 96% on ArduinoUNO R3, so it may not work on a compatible machine. Sorry to say, I can’t improve this code any more. Please recode at yourself, If you want to install.

2016/9/21 Additional notes

Sketch size of ‘AR-FOCUS’ is shrunk by new Arduino IDE 1.6.11. I think there are optimization in basic function in IDE. And I added a define value ‘IDLE_TIME’ which I had forgotten. It isn’t needed if you don’t use ‘Reducing jitter’ function. Please check it.

Sketch contents caution

About display

‘AR-FOCUS’ is depends on u8glib library for use of graphic display. It works by 128 * 64 OLED screen of SPI. In some cases, also works on I2C as well, although its response is not admirable.

SPI must be connected from D8 to D13 pins on u8glib library. I noticed that it also works in different pins. Like connection from A2 to the pins of the A5. If it may goes wrong, please correct the original setting. (D8 ~ D13) Also, rewrite code in case of I2C.

U8GLIB_SSD1306_128X64 u8g(A2, A3, A4, A5);  // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9, 8);  // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_DEV_0); // OLED / I2C / TWI

Logic of switches

You can invert of ‘ALT’ or ‘AUTO’ logic by rewiting defined value.

#define ALT_LGC       1
#define AUTO_LGC      0

Set to suit your environment.

About AUTO MOVE

I haven’t use timer in “AUTO MOVE”. Because it may be disturbed to servo PWM, and Serial communication. So time of “AUTO MOVE” may not be accurate. ‘AR-FOCUS’ is on developing to finish it, so far. So there is no actual implement, but is only operation check that I did. I can’t tell what kinds of bugs are there.

AR-FOCUS Sketch

This sketch may destroy your machine or lens. Please go at your own risk.

*‘u8glib’ library is required in ‘AR-FOCUS’. You can install it from IDE’s library manager.

*Read here if you failed to compile. (15/2/2017)

クリエイティブ・コモンズ・ライセンス


クリエイティブ・コモンズ・ライセンス
jumbler 作『AR-FOCUS』はクリエイティブ・コモンズ 表示 – 非営利 4.0 国際 ライセンスで提供されています。