From Clomosy Docs
The examples prepared during the Clomosy seminar event are provided below.
These examples were created to demonstrate the features of the Clomosy platform. As Clomosy developers, you can enhance these examples and utilize the features in other applications.
Hello World Example
Let the first example you do in the Clomosy development environment be the Hello World example.
That way, you get started with the easy step.
In this application, a form and a button are created. When the button is clicked, it triggers a procedure. In this procedure, a loop iterates 6 times. Within this loop, a conditional statement (case) generates different outcomes for each value.
Code:
var MyForm:TclForm; I:integer; startBtn:TCLButton; void StartBtnOnClick; { for (I = 1 to 6) { case I of { 1:ShowMessage('Hello World'); 2:ShowMessage('Number 2'); else { ShowMessage('Others=> counter: '+IntToStr(I)); } } } } { MyForm = TclForm.Create(Self); startBtn= MyForm.AddNewButton(MyForm,'startBtn','SHOW'); startBtn.TextSettings.Font.Size=50; startBtn.Align = alCenter; startBtn.Height = 50; startBtn.Width = 100; MyForm.AddNewEvent(startBtn,tbeOnClick,'StartBtnOnClick'); MyForm.Run; }
Web Browser App
The programs used to access internet pages are called browser or web browser. Using Clomosy with the TclWebBrowser component, we can access any website we want.
Link:
Clothing Selection App
By using color palettes in the application, you can create a combination by selecting the color of the clothes you wear. You can also choose your gender in the application. As you click on the colors, the colors change. If you want to get the code of a color you like, just click on the area where the color code text is located.
Link:
Body Mass Index (BMI) Calculator App
In this application, the body mass index is calculated by entering the weight, height and gender of the person and clicking the confirmation button. According to calculations, it gives messages such as weak, normal, overweight and obese. In addition, the picture below changes according to the weight.
Link:
QR Personnel Attendance Control System Application
The purpose of this example is to keep track of the arrival and departure times of employees in businesses. Special devices and software are required for these operations. We have made all the work possible with a simple processing through clomosy.
- A tablet produces a changing QR code, preventing any irregularities. We have also solved the problem of reading in different locations by changing the code every 10 seconds. An administrator in the project must be responsible for generating the QR code.
- The personnel can arrive and scan the QR code with their phones.
- The registration process and scanned time of the personnel are recorded on the administrator's screen. (The administrator must log in through Windows.)
Link:
IOT App
- What is IOT?
The Internet of Things (IoT) describes the network of physical objects embedded with sensors, software, and other technologies for the purpose of connecting and sharing data with other devices and systems over the Internet. These devices range from ordinary household objects to advanced industrial tools.
We use the MQTT protocol to enable IoT devices to communicate with each other on Clomosy. So what is MQTT, see MQTT page for detailed information.
In this example, we transmit the code embedded in Raspberry Pi technology to the server with the help of MQTT protocol over Clomosy. By providing communication in this way, we can connect to the Raspberry remotely and turn our led on and off.
Information: It is necessary to write the desired codes into the Raspberry Pi system. For this, we coded in Python and integrated the activation code of our Clomosy project. In this way, we established our connection.
Link:
Messaging App - MQTT
It is an messaging application made for different devices to communicate with each other with MQTT.
Link:
Gyroscope Ufo Game
Before we get into the game, let's understand what a gyroscope is.
- What is Gyroscope?
The gyroscope sensor is a system that can detect angular velocity. In other words, the rotation direction and speed of a stationary object are determined by comparing the angular ratios in three vertical axes. It processes the data it detects with the help of the processor and converts it into electrical signals. The gyroscope works on the principle of maintaining angular balance, which is used to measure or adjust direction. The basis of gyroscopic motion is based on the laws of physics and the principle of centrifugation. For these reasons, it allows us to perform instant movements faster.
Cell phone, tablet etc. It is integrated in technological devices and is a system that we use a lot in applications, games and 3D software. It is used in applications such as car races, game consoles, camera sensitivity adjustment in photo shoots and navigation that we steer by turning left and right on mobile phones.
In the game, we reach x, y location information by directing our device with the gyroscope method. Afterwards, when we bring the UFO to the desired area, the game is over. It is used in 2 different features in the game. These; Device vibration and device sound effect.
A simple game has been developed using the gyroscope feature. In this way, you can develop the games you want.
Link:
Word Game
The game is started by pressing the "START" button. Then, questions with 5-letter answers are drawn from the database. In this way, it is tried to find the desired word in the game. There are 3 rights and 1 hint in a game. When these rights expire, you save and the game is reset.
Link:
Output:
Hangman Game
The game starts by choosing the word length on the first page. After that, clicking the button at the bottom leads to the game page.
Here, by clicking the "Start Game" button, our question appears on the screen. You have 11 rights in the game. In this way, if you find the word until you are full, you win the game.
Link:
Output:
Animation and Effects Game
TclGameForm is used as the form structure in this game. Besides, TclTimer component is also used. Features such as adding animation and sound effects are used on TclGameForm. You can develop applications by looking at the definitions here.
Link:
Artificial Intelligence App
A conversational AI chat engine specialized in dialogue using the OpenAI engine has been developed within the Clomosy infrastructure, and it has been utilized in this example.
Link:
Raffle Application
This project includes a Raffle Application where users can participate and determine the winners. The application provides real-time communication and the ability to share the results of the draw via MQTT.
Link:
Clomosy Notification Sender
This project includes the Clomosy Notification Sender application. Users or administrators can send a specific message or announcement to all users as notifications. The application provides customized user interfaces for different user profiles.
Link:
Find the Difference Game
This project includes a find the difference game where users try to identify the differences between two images. The game consists of a total of 4 levels. The goal of the game is to detect the specified differences to advance to the next level.
Link:
Drawing Form Application
This project includes a drawing form application where users can create and edit images using various drawing tools. The project provides a first-class drawing experience.
Link:
Online Quiz Application
This project involves an online quiz application where users can answer questions and view results through graphs. The project is a dual-platform application designed for both mobile and desktop use.
Link:
Toothpick Collection Game
This project represents a fun game where you control an object using motion sensors.
Link:
"Explain It to Me" Application
This project includes a lottery and word game application. The aim of the project is to enable users to participate in the raffle and other players try to explain the word to the person who won the raffle. The player who wins the draw collects points as he guesses.
Link:
Balloon Popping
This project includes a balloon popping game where computers and mobile devices work simultaneously. The draw is held and whoever won the draw tries to know the question without popping the balloon.
Link:
Asteroid Game
This project involves an asteroid escape application.
Link:
Fruit Collect Game
In this project, we are collecting food falling from the sky. If we collect healthy foods, our score increases, and if we collect unhealthy foods, our score decreases. Players are listed according to their scores.
Link: