In this week in group assignment we have compare the three tool.
Processing is a graphics library and IDE based on the Java programming language, first released in 2001 by developers Casey Reas and Ben Fry. Its goal is to simplify computer programming for visual artists, providing new classes and mathematical functions for creating and processing computer graphics. Its IDE, called Sketchbook, uses an abstraction, called a "sketch," to represent its fundamental Java class, HERE .
Basically Processing is besed on a Java-based language. It is an open source programming language and integrated development environment (IDE) developed for new media arts and visual design communities with the Image processing , GUI design and aim of educating people who are not programmers with the visual concept of the essence of computer programming.
MIT App Inventor is a web application integrated development environment originally provided by Google, and now maintained by the Massachusetts Institute of Technology (MIT). It allows newcomers to computer programming to create application software(apps) for two operating systems (OS): Android (operating system)|Android, and iOS, MIT App Inventor is an intuitive, visual programming environment that allows everyone even children to build fully functional apps for smartphones and tablets. Those new to MIT App Inventor can have a simple first app up and running in less than 30 minutes.The MIT App Inventor project seeks to democratize software development by empowering all people, especially young people, to move from technology consumption to technology creation, HERE .
It uses a graphical user interface (GUI) very similar to the programming languages Scratch (programming language) and the StarLogo, which allows users to drag and drop visual objects to create an application that can run on android devices, while a App-Inventor Companion (The program that allows the app to run and debug on) that works on iOS running devices are still under development. In creating App Inventor, Google drew upon significant prior research in educational computing, and work done within Google on online development environments
Arduino is the language of the Hardware , The integrated development environment (IDE) of Arduino is a cross-platform application software developed on Java and C, and includes an editor with syntax highlighting, parentheses and automatic indentation, and a compiler capable of compiling and uploading with one click. We use the C ++ language base for the Arduino operation and the compiler uses avr-gcc. It is designed so that users who are unfamiliar with software development can easily program. Programs or code written through these Arduino IDEs are called "sketches". HERE .
The source code for the IDE is released under the GNU General Public License, version 2.[4] The Arduino IDE supports the languages C and C++ using special rules of code structuring. The Arduino IDE supplies a software library from the Wiring project, which provides many common input and output procedures. User-written code only requires two basic functions, for starting the sketch and the main program loop, that are compiled and linked with a program stub main() into an executable cyclic executive program with the GNU toolchain, also included with the IDE distribution.The Arduino IDE employs the program avrdude to convert the executable code into a text file in hexadecimal encoding that is loaded into the Arduino board by a loader program in the board's firmware.By default, avrdude is used as the uploading tool to flash the user code onto official Arduino boards.
With the rising popularity of Arduino as a software platform, other vendors started to implement custom open source compilers & tools (cores) that can build and upload sketches to other MCUs that are not supported by Arduino's official line of MCUs.
Both languages are relatively easy to learn compared to other languages. In the case of processing, it is a language for education. Arduino is a language designed for beginners to easily program from the time of design.
Processing and Arduino have very similar interfaces, and even the scripting language you use is very similar. So if you modify the example of processing a bit, you can use arduino and vice versa.
However, in the case of processing, a program designed to show something visually, Arduino is a program for showing the machine's operation by programming with kits, so you can use it as convenient for your purpose.
In this week i want to make a mobile app which can controll the DC and servo motor using Bluetooth. I want to use this app in my final project to control my Fab Mobile Robot.I want to control the movement of robot and angle of camera using BT app. I am new to app making so i searched on internet and found the MIT app inventer is good platform for new app developers like me.
MIT App Inventor is a web application integrated development environment originally provided by Google, and now maintained by the Massachusetts Institute of Technology. Best thing about this platform is that it block/graphically programming. You can drag and drop the blocks to make your own constumize app. You can make your own app here
Open the above link and create/login into your account. Select the new project. Mobile phone with screen will appear. This is the page where graphical work of app will be done. First of all select the screen orientation. I choose landscape. Then click on upload to upload the background image.
Click on table arrangment. On right side new window will appear. On columns box put 5 and on rows box put 5 to make 5x5 table. In width box, select the fill patern.
Click on label and write the heading/name of the app.
Open inksapace and draw the arrow icon for direction. My robot having omni wheel so i want to have atleast eight direction buttons. left, right, forward and backward along with four digonal buttons and three camera direction buttons. Rotate the arrow with 45 degree and save as. Repeat this for eight times and get eight direction buttons.
Click on button on left side of screen and drag it to the main screen. i Drag 8 button and then place them accordingly. First of all click on upload and upload all the images for button. Then click on individual button below the list picker. On right extream setting of that button will appear. Click on "image" box and choose the image from uploaded pictures for this button. repeat this for every button. Then click on camera direction button on buttom row and add picture to it too.
Click on the sensor(avaiable on left side) and click on clock and drag it to below the main screen. This is digital internal clock. Then click on connectivity(avaiable on left side). Select the bluetooth client and drag it to the below the main screen. This add the bluetooth instant to the app.
Now Click on Blocks to switch the window from desinging to block programming. First of all we need to set up bluetooth connectivity for that follow the steps
Double click on list picker and drag the "When block with before picking". Drag the set element and place inside the when block. Add the bluetooth client with address and name.
Double click on list picker and drag the "When block with Afte picking". Go to logic and drag the if/else condition and place the if/else box inside the list picker. Go to list and drag the "Call bluetooth client" block. Add the lister picker element on its input. Click on element and change it into selection.
Duplicate the complete row in the list picker before picking and past it into the else portion of list picker(after picking).
Double click on clock and Drag the when-clock block. Add the if/then box inside it. Set the if condition "bt client1 is connected" then add block of text and block of color in the then condition. Write text connected and make color green. It shows if BT is connected so icon will show test connected and it will be of green color. Copy paste all the thing and "not" before the condition. Replace the text "connected" with "disconnected" and color to red.
Bluetooth connection is setup correctly. Now create functions for buttons.
Now it is time to make function of button. I am write code in this way when any button is clicked, it send any Alphabate via bluetooth to microcontroller. And microcontroller will act accordingly. Click on any desierd button then drag the block "when button is clicked". Inside this block whatever you put command. App will do when this button will be pressed. Drag the call block that send the text. Add then empty box for text/alphabate your choice. I have 12 buttons. Copy paste this block and change the button name and text that it will send.
After coding, click on build and download the .apk file and install on your phone.
I am using breakout board of Atemga 32U4 which i made in week8(Embeded programming). Microcontroller board is connected with board for HC-05 bluetooth module which i made in Communication week. Servo motor is connected with Microcontroller. In my final project this servo will be used to set the position of camera of my Fab mobile Robot.
Upload this code to the microcontroller. This code receive data from BT module which is sent through mobile app. When any button is pressed, mobile app send the one alphabate. That alphabate is received through bluetooth module to the microcontroller. Microcontroller read alphabate as ASCII number. This code recive that number. Then i put condition over it. There three position of camera. If right button is pressed then angle of servo will be 0. If center button is pressed then angle of will be 90 and if left button is pressed then position of servo will be 180. Upload the code.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Email: farhan.shah@iba-suk.edu.pk