Create a 3D Object

Posted: December 16, 2013 in Uncategorized

Step 1: Make as many photographs you can around a 3D object with small variation of angle in the x and y axis.

Step 2: Use an specific software as 123Dcatch to create an OBJ file.

http://apps.123dapp.com/catch/

Step 3: After obtaining the OBJ file, download OBJloader library from

http://code.google.com/p/saitoobjloader/

Step 4: Open processing and change the Annie object for your object. And you will see your object in Augmented Reality because you have also installed Nyar4Psg.

Step 5: We need to create several 3D images with the object in different positions and we can make the 3D objects dance with the music.

To find how to move a 3D object you can use the book protoyping Augmented Reality

ARDUINO -JOAN MARIN

Posted: December 9, 2013 in Uncategorized

http://

1.Hi my name is Joan, and I am going to explain how we can open and close a LED automaticaly depending on the intensity of light with an Arduino.

2.Arduino is a single-board microcontroller it makes using electronics in projects more accessible. The hardware consists of an open-source hardware board like this one.

3.Arduino has several parts, for example the analog/digital inputs/outputs, the red buton is to reset the information( in Arduino Leonardo it works differeent, it is used to restart the code another time), we have also in Arduino 3 Gnd and 2 electricity socket of 3,5 and 5 volts, and he enter of the USB to computer conetion.

4.To download the software of Arduino we go to the web page arduino.cc ; then we click on download ; we then scroll down the page and here we can select our operative system.

5.When we have finished the download, this symbol should appear, we then click “extract file”, we wait for a couple of minutes, we then click on this and we install the arduino software in the computer following this order:I agree, next, in browse we select the place where the program will be installed.

6.We wait for the program to install and when it finishes we close the tab, in the place where we have indicated ( Browse) this new folder will appear, we open the folder and then this symbol will appear, we open it and then we have finished the installation of arduino.

7.We connect the arduino, here we select the port and the type of arduino, in this case it is Arduino leonardo in Com4, this is very important if we don’t do this at the time for sending the code it will give us errors.

8.The first code that we will use is the Blink code to know if: the Led works, The recognizon of Arduino by the computer in some cases is one of the most difficult parts.

9.to know if the LDR works correctly we will use the analog read, we have to connect this with a resistor because we can burn the arduino.

10.The language that the Arduino uses is processing, there is a lot of code which is the same but there are some differences, here we can see the code of Blink.

11.void set up, means it is going to be executed only once. In theory serial.begin is the number of signals per second, and we are presenting the LED to the arduino.

12.Void loop means do the same every time, here we are presenting the LED to the arduino and we are saying the intput where the LED is connected, we also say to the sensor that it has to read in analog and where the sensor is connected.

13.Here we are saying in the code that if the analog lector reads more then 1000 the LED will be opened and if it reads less than 1000 the led will close.

14.An LDR is a resistor that changes its resistance depending on the light, when the LDR recives a lot of light its resistence decreases but when it recives less light the resistance increases.

15.We are going to connect the LDR and the resistor like this in order to have the best result, if we don’t put the resistor in we can’t make a curtcircuit an we will burn the arduino.

16.5v is the voltatge,A0 is the Analog read and GND is the ground, in this scematic picture we can see the passing ofelectricity, on the left we can see the example with a little light, the LDR increases its resistence and the current goes to A0. So the value pass 1000 and the LED opens.

17.In the picture on the right is an example of, when the receptor recives a lot of light so the resistence decreases and the electricity goes to GND, so the lectorA0 receives less intensity and the arduino orders the led in 13 to close.

18.To know if the code makes sense we click the tick, to send the code to the arduino we click the arrow and in order to see the analog read we click on the magnifying glass.

19. This is what we will see, in the analog read, the value goes from 0 to 1023 it elevates to ten different numbers, the first time that we see these numbers we can adapt the code changing the values to make the LED open and close depending on the intensity of light that we want.

20.Thanks to all of you to listen me or to read this in my blog.

Share this:

BOX2D – ADRIA LABAY

Posted: December 9, 2013 in Uncategorized

TTS -Josep Gañan

Posted: December 9, 2013 in Uncategorized

1.Let me introduce TTS

2.Index
3. TTS: TTSlib (Text To Speech) is a wrapper around free tts for processing. The library can be used in order to give you a voice This library is a wrapper around the FreeTTS Java library that helps us to write a sketch that reads out text.
4.INSTALLATION
5.First you open the internet and search “tecnologies.net” which is a page created by Francesc Perez and then you look for the tutorials which tell you how to install TTS
6.We see that the video is a tutorial on how to install TTS.
7.After we have watched the video you then go to the processing program
8.Open the Sketch tab and then Import Library and go to Add Library.
9.So you look in the ttslib Library Manager and you click the option to install, it is then directly installed into your library.
10.Once installed you will have to go to File-Examples Java books and a new window will appear on your screen.
11.After this window has opened you then put what you want to say where it says “tts.speak.”
12. To use the library simply import the lib, create a code for the TTS class and the speak method.
13.CODE
14. Instantiate a TTS object in the setup() method. Your sketch should look like the following code snippet.
15. We will add our sketch, which will get called if someone clicks on our sketch window. In this method, we are calling the speak
16.To use the library simply import the lib, create an instance of the TTS class and click method
17.From version 0.3 it also allows you to alter the pitch and the pitch range of the voice by using tts.speak
18.Version 0.4 allows you to define the text by clicking on the image that appears. In this version I added two new speaking methods, which allow you to choose which speaker for the text.

Electronic Theater

Posted: October 16, 2013 in Uncategorized

We are going go to do an electronic theater , we use two boxes that inside of one will  be an Arduino and a speaker and the other (R2) will be deaf the R1 will have sensors of (Ultrasonic,LED, Humidity ,CO2.Light sensors TTS and voice recognotion

 

Arduino

Posted: October 15, 2013 in Uncategorized

Arduino is a electronic board,look at these video of the creator of arduino .

OPP

Posted: October 9, 2013 in Uncategorized

OPP means Object Oriented Programming Processing is an OPP language.

C is not OPP languages but it is important to know because is it the base of other programming languages. And is the most common programming language.

An the object could be created by the program. And objects possess properties or atributtes and are capable of some functionality or behaviour.

For example: Properties  like color ,size , position velocity ,type of birds(Angri Birds) and concerning functions (launch operation.Flying motion )

Class:  classes are objective factories .A classes define objects and servers as a factory y for creating or instantiating.

Box 2-D Example

Posted: October 9, 2013 in Uncategorized

 

In the code that you will see that is inside examples <books Nature of Code chapter.

The code contains a first part that are the body definitions.

1. Create a body definition. This means to use a class that the name is Box that is inside the library BOX-2D. Also you create the initial position of everthing and the type Box-2D. There are three types: Dynamic (respond to physics), Static (without movement) and Kinematic (the user controls the mouse. The web cam use computervision to recognise objects).

2. Create the body. This is only one line of code. It’s usual that the body is a pont, having not a shape.

3. Create a shape, for example: Poligon shape, box shape, circular shape, chain. In this step we are attachin geometry to the code.

4.Create a fitxur (fix the shapes to do body giving density,friction , and restitution (brouceness)

5.Put it all togher.

Android SDK

Posted: October 2, 2013 in Uncategorized

Andrid SDK is a Sofwarw Development kit,.It is a free .It is a programme that compile and build (it changes the human programming languages into machine code.That is easily understood by the computer).