Below you will find the CRC16 algorithm that you can use in your software. “A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data. Blocks of data entering these systems get a short check value attached, based on the remainder of a polynomial division of their contents. On retrieval, the...
C# Flexible API for PEAK-CAN USB (PCANBasic)
There are several USB-to-CAN devices, however for developers usually there is limited support (at least free) and when you have to do things quick could lead to unexpected problems. For that reason, and due to the fact that nowadays several devices are using CANBuses below is a quick-n-dirty way to interface your PC application to a CANbus. In this post, you will find a simple yet effective way...
Convert uint8_t array to char* HEX representation in C
Long story short, this function just creates a char array which contains the HEX representation of a uint8_t (bytes) array. Useful if you don't want to use sprintf etc..
STM32 video player over network
This example presents a simple video streaming(PC) and video player(STM32F746 board). The video streaming solution is designed to be flexible with a simple “threading” architecture that allows customization. Due to the image processing limitations (missing JPEG decoder) of the STM32F746) which acts as a client, the server (linux PC) is responsible to decode the selected media files and transmit...
I2C Bitbanging for Embeded Systems
Interacting with I2C devices is usually done with a microcontroller and an I2C library, but sometimes either the microcontroller is not supporting I2C or you have some other restrictions which do not allow you to use the provided I2C library. For that reason you can always Bitbang the I2C protocol a.k.a emulate the behavior of this protocol by manually toggling the pins. The following example is...
Android bottom navigation menu example using activities
Android design supports library that provides a Bottom Navigation Bar where is an important widget in the Android application. Is a simpler way to look between 3 to 5 screens, if you have more than 5 screens is better to use slide navigation drawer. Mostly, used fragments in navigation view to load different screens based on the user selection the usage of Fragments with Navigation may lead to...
Poweroff Timer application in Microsoft Store
Poweroff Timer is a windows universal application(UWP) in Microsoft Store written in C#. This application enables you to set a timer to shutdown your PC at a specific time. It makes your power management much easier and more convenient. When you assign the timer, PowerOff Timer will minimize in the system tray and run silently in the background. if you right-click on its icon, the menu that...
How to add Hotkeys/Shortcuts in WPF
In any application, hotkeys (shortcuts) are useful for navigation as well as to launch a control’s code, unfortunatelly Hotkeys in WPF are not as easy as in Windows Forms. In this post we will briefly present an example of how keyboard shortcuts can be used to execute commands using key bindings. What you will need is to create a new WPF window and follow the instructions below. Step 1: In...
Swirlhole, how far can you go?
Swirlhole, is an arcade game for android distributions. We can categorize it also as an endless runner game. This type of games has the characteristic that the world building by own also the player must dodge obstacles as they automatically and continuously scroll onto the screen, with the simple goal of not crashing into anything for as long as possible. The main architectonic is simple we put...
How to make a ring using torus method in Unity 3D
In Unity3d you have a plenty of choices to make several objects but, in case that you need to make an object like a ring where you can get through its center it’s difficult with the prebuild already objects (Sphere, cube, capsule etc) you probably should swivel in torus technique, of course, there are some other tips for example circles with particle systems. In geometry, a torus is a...