This page serves as a list of recent code projects, experiments, and interests using various languages, and technology frameworks including:
C++, C#, and most recently Python and Rust.
Examples of recent projects that I will soon share on this site include:
I have a long history using C++ and C#, and currently experimenting with Python to use it for projects at work,
and for personal interest. Below is a recent list of code examples (that will continue to evolve). Each exercises one or more Python 3 language constructs.
You can download and run the following list of examples by cloning the python3probs repository:
https://github.com/mwcorley79/python3probes.git
MPLv2 is cross-platform library/framework for developing message passing systems. It wraps full duplex TCP sockets, and supports concurrent clients. MPLv2 is implemented in six python scripts, described below. Note: this MPLv2 is identical to C# (dotnet) MPLv2 version described below (repo is here): dotnet MPLv2 .The interface syntax and semantics of these two projects is virtually identical. Message.py and Message.cs are wire format compatible, and thus can used to acheive C# and Python interop.
Create an instance of TCPConnector, connect to server (TCPResponder) to initiate message passing. Run Command: python .\TCPConnector.py
Create an instance of TCPResponder, and start tge listener, for incoming (concurrent) client (TCPConnector) requests . Run Command: python .\TCPResponder.py
Users must derive new from ClientHander, and implement asbtract methods: Clone, AppProc. The derived ClientHandler class must be registered with TCPResponder, to be used for service client requests.
This a first version port of Dr. Fawcett's C++ Blocking Queue. to Python. It helps to simplify
code necessary to safely share data between threads. Locks and condition variable synchronization primitives are used.
View pybq.py for additional details, and the terminal command to run the example.
Message.py is being developed in part, for wire protocol compatibility with the Message class constructs defined and used in C++/Rust comm compare experiment described above. However, Message is a handy general utility for handling binary and string message types interchangeably. Message.py exercise multiple Python language constructs including:
2nd version port of Dr. Fawcett's C++ Blocking Queue. to Python, and uses Generics. It helps to simplify
code necessary to safely share data between threads. Locks and condition variable synchronization primitives are used.
View pybqGeneric.py for additional details, and the terminal command to run the example.
This is a more complex, combined test that uses multiple threads, much like the use in socket communication
View bq_test_with_message.py for additional details, and the terminal command to run the example.
View withProbe1.py for additional details, and the terminal command to run the example.
View destructor_probe.py for additional details, and the terminal command to run the example.
This example exercises GPIO (general purpose I/O) access libraries to read (over i2c) telemetry from a BME280
temperature sensor, and the Azure IoT Hub SDK to package and send JSON formatted telemetry to the Azure Cloud (IoT Hub).
The Pi device (hardware) should resemble the following: https://www.raspberrypi-spy.co.uk/2016/07/using-bme280-i2c-temperature-pressure-sensor-in-python
View python_rpi_temperature_iot_device.py for additional details.
MPLv2 is cross-platform library/framework for developing message passing systems. It wraps full duplex TCP sockets,
and supports concurrent clients.
MPL is implemented in six C# packages, described below. Note: this MPLv2 is identical to Python MPLv2 version described above.
The interface syntax and semantics of these two projects is virtually identical. Message.py and Message.cs are wire format compatible, and thus can used to acheive C# and Python interop.
You can download and run the C# examples by cloning the repo here
Create an instance of TCPConnector, connect to server (TCPResponder) to initiate message passing. Run Command: dotnet run --project .\TCPConnextor\TCPConnextor.csproj
Create an instance of TCPResponder, and start the listener, for incoming (concurrent) client (TCPConnector) requests. Run Command: dotnet run --project .\TCPResponder\TCPResponder.csproj
Users must derive new from ClientHander, and implement asbtract methods: Clone, AppProc. The derived ClientHandler class must be registered with TCPResponder, to be used for service client requests.
This is Dr. Fawcett's BlockingQueue. Used it with his permission and taken directly from his website (repo) here: c# BlockingQueue It helps to simplify code necessary to safely share data between threads. Locks and condition variable synchronization primitives are used.
Message.py is being developed in part, for wire protocol compatibility with the Message class constructs defined and used in C++/Rust comm compare experiment described above. However, Message is a handy general utility for handling binary and string message types interchangeably.
The objective of this project is to develop, and illustrate a simple design for a working prototype of an (IoT-enabled) Remote Temperature Management device. Temperature and humidity is monitored
remotely in the Cloud,
will activate a fan or air conditioning unit etc., (and optionally take action using IFTTT) when the temperature and/or humidity exceeds a user specified threshold.
You can download and run the Remote HVAC example on a Raspberry Pi by cloning the repo here