Saturday, 31 March 2018

Unit Testing Simple Linux Kernel Module

This morning, I am trying to learn Linux Kernel development from https://blog.sourcerer.io/writing-a-simple-linux-kernel-module-d9dc3762c234  Link  .

The examples are very good. However, I am looking for a way to do unit testing and I can't find any info on how to do this. I am a unit test advocate and I fully support unit testing. Why? Because system testing is expensive and from my experience, time-consuming.

I would like to unit test on Eclipse so that I could use Eclipse CDT and GDB's full power in terms of debugging.

Eclipse Oxygen.3 CDT Release (4.7.3)
With just a few #defines and #ifdefs, I was able to come up with a way to do simple unit tests using asserts. Nothing impressive actually, however the quick feedback of unit tests will be very helpful in getting good code coverage of testing.

I placed the source code demonstration here: Link

For now this will work, however I will be improving this and will be adding a proper unit testing framework.

Thursday, 29 March 2018

My Less than $4 Faucet Temperature Monitor

This weekend, I was able to finish my temperature monitor. 

Faucet temperature monitor (I still need to tidy up the wiring LOL)


I just bought the following materials:
- Temperature display with thermocouple from Ebay ($1.50)
- Crayon box from Walmart ($1)
- Electrical tape

I used my Dremel tool to fit the crayon box into my faucet. All in all, I just spent less than $4.

Saturday, 24 March 2018

Easy Arduino unit testing using Emulare and ArduinoUnit

I just uploaded a video on youtube on How to do Unit Testing on Arduino using Emulare and AndroidUnit. This is purely a simulator unit testing and doesn't require a board, which is great for unit testing.


Saturday, 3 March 2018

Writing NFC app using Cordova for M24LR16 I2C RFID EEPROM - but...

I am in the process of creating an Android app using Cordova with phonegap-NFC plugin. I am interfacing with an RFID I2C EEPROM M24LR16 and my firmware is already ready and tested. I have the sample Android app of ST Microelectronics and the RFID EEPROM works and I can transfer and read data. But after building the Cordova app for 1 hour, it didn't work.

Digging into the documentation, phonegap-nfc doesn't support non-NDEF tags. Most folks are suggesting to modify the phonegap-NFC library for that purpose. It is my first time to work with NFC tag firmware and this is a very good learning experience. I don't know which path to go as of the moment, but I will try to modify the phonegap-NFC library. If it doesn't work out, I will develop the Android app using Android Studio.

Update:
I had just finished creating the Android app using Java (Android Studio). It works great with Non-NDEF NFC tags. :)