I have developed a class library 'ceSerial.h' to use serial port (com port) on Windows, Mac and Linux.
This cross-platform 'ceSerial' class is written in C++ and we just need to include "ceSerial.h" in your source code in order to use it.
A simple example for C++ console program using the class is demonstrated.
The source code can be found at
https://github.com/yan9a/serial
Wednesday, May 31, 2017
Friday, March 31, 2017
Geometric Center of Myanmar
I have written a program to find the centroid of Myanmar.
The centroid is found to be at latitude 20.86 degree and longitude 96.48 degree after compensation for Mercator projection.
Source code: https://github.com/yan9a/cecv/tree/master/MyanmarCentroid
Document: Section 5.4 of https://yan9a.github.io/cecv/opencv.pdf
Source code: https://github.com/yan9a/cecv/tree/master/MyanmarCentroid
Document: Section 5.4 of https://yan9a.github.io/cecv/opencv.pdf
Friday, February 24, 2017
OpenCV 3.2 / 3.3 on Windows 10 - 64 bit Using Visual Studio 2015 / 2017
Using the latest version OpenCV (currently opencv-3.2.0) pre-built for 64 bit Windows with Visual Studio 2015 is discussed.
The procedure is also applicable for OpenCV 3.3 and Visual Studio 2017. OpenCV is available to download at
https://sourceforge.net/projects/opencvlibrary/files/opencv-win/.
Then, the downloaded file, opencv-3.2.0-vc14.exe is extracted at C:\opencv as a folder called opencv320. Visual Studio 2015 IDE is downloaded from https://www.visualstudio.com/downloads/ and install. The following steps are tested on Windows 10 64 bit using Visual Studio 2015 and OpenCV-3.2.0. For other versions, the precedures are similar.
At first OPENCV_DIR is declared as an enviroment variable. Run 'Command window' in administrator mode by right clicking start menu and choosing command prompt (admin). Enter
https://sourceforge.net/projects/opencvlibrary/files/opencv-win/.
Then, the downloaded file, opencv-3.2.0-vc14.exe is extracted at C:\opencv as a folder called opencv320. Visual Studio 2015 IDE is downloaded from https://www.visualstudio.com/downloads/ and install. The following steps are tested on Windows 10 64 bit using Visual Studio 2015 and OpenCV-3.2.0. For other versions, the precedures are similar.
At first OPENCV_DIR is declared as an enviroment variable. Run 'Command window' in administrator mode by right clicking start menu and choosing command prompt (admin). Enter
setx -m OPENCV_DIR C:\opencv\opencv320\build\x64\vc14
Wednesday, February 22, 2017
A LaTeX Report Template for Myanmar Language Using XeTeX
This is a template for LaTeX report in Myanmar language using XeLaTeX.
It is available at
https://github.com/yan9a/LaTeX_Myanmar_Language.
To properly render Myanmar fonts using LaTeX, it is necessary to use TeX typesetting engines that support Unicode such as XeTeX. Simple examples for testing XeTex can be found in an older post Myanmar (Burmese) Language with XeTeX and LuaTeX.
https://github.com/yan9a/LaTeX_Myanmar_Language.
To properly render Myanmar fonts using LaTeX, it is necessary to use TeX typesetting engines that support Unicode such as XeTeX. Simple examples for testing XeTex can be found in an older post Myanmar (Burmese) Language with XeTeX and LuaTeX.
Tuesday, February 21, 2017
Integration of Accelerometers
We have several 3-axis accelerometers attached to a rigid body at arbitrary positions.
The rigid body is moving at arbitrary linear and angular movements, but the accelerometers can only sense linear accelerations.
Consequently, the information about angular movements of the rigid body is not available.
A question is whether it is possible to integrate them to get an equivalent accelerometer without using angular movement information.
After consideration, I think the answer for that question is 'YES'.
A question is whether it is possible to integrate them to get an equivalent accelerometer without using angular movement information.
After consideration, I think the answer for that question is 'YES'.
Monday, January 9, 2017
Creating Dynamic Link Library (DLL) in C++ and Using it in Visual Basic .NET
I need to create a DLL (Dynamic Link Library) to be used in Visual Basic .NET 2012 (vs11).
And I want to write the DLL in C++.
Two different ways to accomplish the task are discussed below.
CLR Class Library
Win32 DLL
Thursday, December 15, 2016
LaTeX Template for Thesis
Here is a LaTeX template for thesis writing.
It is available at
https://github.com/yan9a/LaTeX_Template_Thesis.
It is available at
https://github.com/yan9a/LaTeX_Template_Thesis.
Wednesday, August 10, 2016
TFT LCD Touch Screen - ILI9341
I tested a 2.4 inch 240 x 320 resolution TFT LCD touch screen bought from Aliexpress.
That module has LCD display, touch input, and SD card reader. I have written some example programs to use that module and they are available at the following link.
https://github.com/yan9a/cearduino/tree/master/tft_lcd_touch
That module has LCD display, touch input, and SD card reader. I have written some example programs to use that module and they are available at the following link.
https://github.com/yan9a/cearduino/tree/master/tft_lcd_touch
Thursday, July 7, 2016
Motor Driver - DRV8834
I am designing a motor driver to drive a stepper motor AM1020-V-6-65. At first, I thought to use A4988 from Allegro. But its supply voltage of 8V - 35V is not suitable for a 6V motor, its chip size 5 mm x 5 mm is bigger than what I want. DRV8835 from TI has appealing 2 mm x 3 mm size but it is meant for DC motor and there is no indexer to support convenient control of stepper motors. Finally, DRV8834 with 4 mm x 4 mm size, motor supply voltage 2.5V - 10.8V, and current 1.5A per coil is chosen.
Subscribe to:
Posts (Atom)
