Menu
HomeWeek Assessment :
write an application that interfaces with an input &/or output device that you made.
I started my week by looking at the schedule to see the list of the software and that options that I have. There is two software that I was familiar with, Matlab and Processing. I never used this software as an interface. This week is totally new to me and I believe that ever I will learn in this week definitely I will use it in future. I go through some pages from the previous year. most of the student used Processing to do this week assignment then App Inventor. I decide to work with Processing cause I have a background about it and to practice my self in writing codes, besides I processing you have the full control of everything and it can be connected to Arduino IDE.
Hashim gives us a quick session about App Inventor. He is one of the previous students in FabAcademy and he uses it for his week assignment.
I ignore this message because it needs me to download another software. I will do that later. I will focus on Processing.
I sow that previous year student page as I said they used Processing. but I found an issue they did not describe clearly how they connect Arduino IDE with Processing. whatever they did not document the error messages. I can remember that I saw someone write something about error messages. I got that feeling that it's run smoothly with then while I'm stuck in how I can connect Arduino and Processing.
I search in google in how I can connect the two software and I found really good websites. I copy the codes in tutorials but still Im facing difficulty.
later I saw Al-Zubair page he was able to connect Unity with Arduino IDE and I found it a good opportunity to use to learn new software. I asked help from Al-Zubair to show me how did he programed unity to be able to read the serial port. This was my first time I work with a game development platform. I always was interested in games and I would like someday to create my own games. Anyway, I did something that related to my final project. When the sensor detects gas or smokes the fire image will appear. so I had my program in Arduino IDE open. I moved to Unity in the GameObject > UI > image. I added my image in the same file that I had to create for the project and automatically will be added to Assets
Drag the image into the workspace
The size of the scene can be changed here
Click on add component > write in the search bar New script > create and add. this will create a C code file that I will write my code on it.
Right click on the script > Edit Script.
It will take you to Microsoft visual studio where I wrote my code and comments.
I want to File > Build Settings > click on Player Settings > Configuration then change the Api Compatibility Level to .NET 2.0 . I did this steps because I couldn't use System.IO.Ports. I got this solution from this website
This diagram shows my connection
This is my Arduino IDE code