Clockwork and its tools – Open Source Software to make things more easily
Clockwork is a programming tool designed to make programming things easier. It provides a simple way to describe the parts of a complicated system and it comes with tools to help get the model right and present information and controls in a user-friendly way. Clockwork programs are interconnected parts, called 'machines' that monitor each other and make sure the whole system performs as required. In our presentation, we will show examples of programming `things` and talk about what to do when the programming gets tough. We start with some simple programs that read data from a sensor and use that data to control a small device while also providing an IoT interface to monitor the process. We show these programs using common C/Python tools and also demonstrate how to do the same things with our Clockwork language and tools. For some years we have been building a set of open source tools for industrial control, based around a language we call Clockwork. It is now possible to compile Clockwork code so it can run on a broad range of devices, from tiny 8-bit Atmel-based Arduinos, small Espressif ESP32 devices, to Linux hardware such as the Beaglebone black. This means that it is now much easier to go a lot further when programming things, without needing to worry too much about writing time-consuming and often quite involved thread stuff. The secret to keeping things simple is to make the components independent so they can run along happily without concern for other parts of the system. In Clockwork, this is done by describing models of the system we want to control or monitor in terms of its states (e.g. hot, cold, on, off, rising, falling, and so on). We think that the model-building approach makes it easier for programmers to achieve more, especially where the system being controlled involves many interacting parts that need to be controlled in parallel and in real time. Accomplished programmers will enjoy programming with the Clockwork tools especially for complex systems and new programmers will enjoy being able to get further with less debugger time. We think that its main benefit is simplifying the process of building complete systems, enabling construction by describing what a system should do rather than how it must do it. There are many exciting features about the clockwork language, including: internal or external monitoring of state changes, comprehensive debugging that tracks the state components are in and how they got there, and the ability to display everything on a webpage -and don't we all simply love that!