Small and versatile
What is Smick
Smick is a microcomputer with a Wi-Fi transceiver to connect sensors and actuators. With Smick, you can easily and quickly build smart transducers that interact, through the Internet, with things and people around the world. It connects to the Internet via Wi-Fi and uses the MQTT protocol for message exchange. It has a K language interpreter for programming and an archive (file system) to store thousands of configurations and programs K (called sketches).
Figure 1 - Smick interfaces
1. MQTT protocol
MQTT is a lightweight messaging protocol based on a publish/subscribe mechanism that makes interconnected nodes independent. Communication is handled by an Internet server called an MQTT Broker.
Figure 2 - MQTT interaction
2. Initial configuration
To connect to the Internet, simply sign up for any MQTT Broker and configure your credentials and Wi-Fi routers in Smick. Various configurations can be stored on Smick to be used in case of variation of operational context.
3. K language interpreter
K is an event-driven language in which the flow of the program is determined by the events. To implement the logic of a system define events, commands and rules (i.e. the relationship between events and commands). When an event occurs, for each satisfied rule, the associated commands are executed. If you model the behavior of a system through finite state automata, its implementation in K becomes natural.
4. How to make a smart transducer
Connect one or more transducers to I/O PINs and write a sketch K to define (see example below):
- I/O connections (relay::d8, Temp::D3)
- the variables for data (max, min)
- the events generated by the sensors (Hot, Cold)
- the commands for controlling actuators (off, on)
- rules for local and autonomous system behavior (Hot -> off, Cold -> on).