TODOPIC
Misceláneas - Interés General => Off Topic => Mensaje iniciado por: jfmateos2 en 25 de Noviembre de 2008, 06:02:32
-
Processing (http://processing.org/) es un leguaje de programación de código abierto, gratuito y basado en Java que permite un fácil desarrollo de aplicaciones multimedia (incluso a usuarios con pocos conocimientos sobre programación). Dispone de una librería Serial RS-232 que permite controlar dispositivos desde el ordenador, lo que también lo convierte en una herramienta interesante para los aficionados a la electrónica.
Sigo esta aplicación desde que se creó en 2001 y que hoy haya llegado la versión 1.0 me hace estar de enhorabuena.
-
Processing es el lenguaje en el que se basa el Wiring de Arduino, y funciona en Windows, Linux y Mac. En cierta forma tiene capacidades similares a Adobe Flash.
Después de una pésima noche, parece que el día empieza bien... me han mandado este mail para anunciar el lanzamiento, en el que se manifiesta la filosofía de este proyecto: dar sin pedir ni esperar nada a cambio, ayudar en la educación, sorprender y divertirse.
We've just posted Processing 1.0 at http://processing.org/download.
We're so excited about it, we even took time to write a press release.
CAMBRIDGE, Mass. and LOS ANGELES, Calif. - November 24, 2008 - The
Processing project today announced the immediate availability of the
Processing 1.0 product family, the highly anticipated release of
industry-leading design and development software for virtually every
creative workflow. Delivering radical breakthroughs in workflow
efficiency - and packed with hundreds of innovative, time-saving
features - the new Processing 1.0 product line advances the creative
process across print, Web, interactive, film, video and mobile.
Whups! That's not the right one. Here we go:
Today, on November 24, 2008, we launch the 1.0 version of the
Processing software. Processing is a programming language, development
environment, and online community that since 2001 has promoted
software literacy within the visual arts. Initially created to serve
as a software sketchbook and to teach fundamentals of computer
programming within a visual context, Processing quickly developed into
a tool for creating finished professional work as well.
Processing is a free, open source alternative to proprietary software
tools with expensive licenses, making it accessible to schools and
individual students. Its open source status encourages the community
participation and collaboration that is vital to Processing's growth.
Contributors share programs, contribute code, answer questions in the
discussion forum, and build libraries to extend the possibilities of
the software. The Processing community has written over seventy
libraries to facilitate computer vision, data visualization, music,
networking, and electronics.
Students at hundreds of schools around the world use Processing for
classes ranging from middle school math education to undergraduate
programming courses to graduate fine arts studios.
+ At New York University's graduate ITP program, Processing is taught
alongside its sister project Arduino and PHP as part of the foundation
course for 100 incoming students each year.
+ At UCLA, undergraduates in the Design | Media Arts program use
Processing to learn the concepts and skills needed to imagine the next
generation of web sites and video games.
+ At Lincoln Public Schools in Nebraska and the Phoenix Country Day
School in Arizona, middle school teachers are experimenting with
Processing to supplement traditional algebra and geometry classes.
Tens of thousands of companies, artists, designers, architects, and
researchers use Processing to create an incredibly diverse range of
projects.
+ Design firms such as Motion Theory provide motion graphics created
with Processing for the TV commercials of companies like Nike,
Budweiser, and Hewlett-Packard.
+ Bands such as R.E.M., Radiohead, and Modest Mouse have featured
animation created with Processing in their music videos.
+ Publications such as the journal Nature, the New York Times, Seed,
and Communications of the ACM have commissioned information graphics
created with Processing.
+ The artist group HeHe used Processing to produce their award-winning
Nuage Vert installation, a large-scale public visualization of
pollution levels in Helsinki.
+ The University of Washington's Applied Physics Lab used Processing
to create a visualization of a coastal marine ecosystem as a part of
the NSF RISE project.
+ The Armstrong Institute for Interactive Media Studies at Miami
University uses Processing to build visualization tools and analyze
text for digital humanities research.
The Processing software runs on the Mac, Windows, and GNU/Linux
platforms. With the click of a button, it exports applets for the Web
or standalone applications for Mac, Windows, and GNU/Linux. Graphics
from Processing programs may also be exported as PDF, DXF, or TIFF
files and many other file formats. Future Processing releases will
focus on faster 3D graphics, better video playback and capture, and
enhancing the development environment. Some experimental versions of
Processing have been adapted to other languages such as JavaScript,
ActionScript, Ruby, Python, and Scala; other adaptations bring
Processing to platforms like the OpenMoko, iPhone, and OLPC XO-1.
Processing was founded by Ben Fry and Casey Reas in 2001 while both
were John Maeda's students at the MIT Media Lab. Further development
has taken place at the Interaction Design Institute Ivrea, Carnegie
Mellon University, and the UCLA, where Reas is chair of the Department
of Design | Media Arts. Miami University, Oblong Industries, and the
Rockefeller Foundation have generously contributed funding to the
project.
The Cooper-Hewitt National Design Museum (a Smithsonian Institution)
included Processing in its National Design Triennial. Works created
with Processing were featured prominently in the Design and the
Elastic Mind show at the Museum of Modern Art. Numerous design
magazines, including Print, Eye, and Creativity, have highlighted the
software.
For their work on Processing, Fry and Reas received the 2008 Muriel
Cooper Prize from the Design Management Institute. The Processing
community was awarded the 2005 Prix Ars Electronica Golden Nica award
and the 2005 Interactive Design Prize from the Tokyo Type Director's
Club.
The Processing website (www.processing.org) includes tutorials,
exhibitions, interviews, a complete reference, and hundreds of
software examples. The Discourse forum hosts continuous community
discussions and dialog with the developers.
-
Pues no puedo entrar a la web, ¿estará mal el link o se ha caído el server?
-
Pues no puedo entrar a la web, ¿estará mal el link o se ha caído el server?
pues controla tu explorador macho porque a mi me abre
solo que tarda muchos en cargarse la pagina
-
Imagino que el servidor estará saturado... realmente esto es un notición. Siete años esperando a que ocurriera y por fin está aquí... No sé cómo expresarlo, es como si un día te dijeran que pidieras un deseo y pidieses éste y va y se cumple...
-
¿Jfmateos que Mcu usa tu? porque ya estoy registrado en el Foro de Arduino y me quiero poner eso, pero tengo confuncion con el leguaje,
estoy mirando a ver si me Sirve un Atmega32 que tengo varios por ahi pasando hambre aunque tambien tengo el Atmega8, cuando lo tenga algo claro posteare algo.
Saludo
-
Hola stk, yo uso éste (http://moderndevice.com/index.shtml) que está basado en un Atmega 168.
-
gracias Mateos, Tomo nota aunque lo quiero montar en una placa universal ya agujereada y lo que no se si el Atmega32 es compartible, todavia no he visto la hoja de datos, pero ya me la estudiare.
-
Finalmente he podido descargarlo y ejecutar algunos de los ejemplos que trae.
La sintaxis se parece mucho a la del C pero se ve sencillo de manejar y potente a la vez.
Una duda: supongo que al estar basado en Java será más o menos fácil colgar aplicaciones en una web para que puedan ser ejecutadas desde el navegador. ¿Sabes cómo se hace eso?
-
Sí que es fácil de programar, incluso con menores de edad.
Sí se pueden incrustar las aplicaciones en páginas web, pues te genera un jar que simplemente tienes que incrustar. Por ejemplo (http://processing.org/learning/basics/mouse2d.html):
<div class="applet">
<applet code="Mouse2D" archive="media/Mouse2D.jar" width="200" height="200"></applet>
</div>
-
Interesante
-
No sé si me expliqué bien... Las aplicaciones de Processing se pueden incrustar fácilmente en una pagina web, pero ya no es tan fácil que controlen desde la web un dispositivo conectado al puerto serie (o USB funcionando como serie) del ordenador servidor (y creo que imposible que controlen algo conectado al puerto serie del cliente; en este sentido, no puedo evitar pasaros este enlace que está basado en Adobe Flash: http://interactive.digitalpictures.com.au/?p=392 ¡¡¡alucinante!!!). Para esto podría usarse la comunicación PHP que tengo en mi firma.
-
Hola mateo!
Pues encontre este projecto con un Atmega32 http://www.subtours.com/ralph/downloads/texts/atmega16_arduino.pdf
voy a experimentar con el a ver que tal.
-
Buscando en la red: como crear GUIs (Interfaces Graficas de Usuario) en lenguaje C/Java para Android-OS y microcontroladores (Arduino), encontré el Lenguaje Processing :-/
Download 2.0 Beta 3 (10 September 2012)
http://www.processing.org/download/
http://www.openprocessing.org/
Les dejo una serie de enlaces para que se informen
Tutorial en castellano
http://processing.joan.cat/cs/index.html
Un codigo ejemplo para guiar una elipse por medio del raton
void setup(){
size(131,80); // tamanio de la cuadro o ventana
smooth();
background(0); // Fondo color negro
}
void draw(){
background(0); // Fondo color negro, comentar esta linea para que superponga la imagen generada anteriormente
ellipse(mouseX, mouseY,20,30); // Dibujar elipse según posición actual del cursor
}
otro codigo mas complejo
/*
By Magda Arques
Based on http://jamesalliban.co.uk/blogContent/pages/motion_trails_v01.pde
which seems to be based on http://processing.org/learning/libraries/framedifferencing.html
*/
import processing.video.*;
Capture video;
import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
int sensor;
int sensor2;
float velocidad;
float velocidad2;
int numPixels;
int[] previousFrame;
int[][] diffPoints;
int diffAmount = 0;
int particleMin = 2;
int particleAlpha = 100;
void setup()
{
size(1024, 720);
background (255);
noStroke();
frameRate(30);
fill(100);
smooth();
video = new Capture(this, width, height, 30);
numPixels = width * height;
previousFrame = new int[numPixels];
diffPoints = new int[height][width];
arduino = new Arduino(this, Arduino.list()[1], 57600);
}
void captureEvent(Capture video) {
video.read();
}
void draw()
{
diffAmount = 0;
for (int i = 0; i < numPixels; i++)
{
diffPoints[abs(i / width)][i % width] = 0;
color currColor = video.pixels[i];
color prevColor = previousFrame[i];
// Extract the red, green, and blue components from current pixel
int currR = (currColor >> 16) & 0xFF; // Like red(), but faster
int currG = (currColor >> 8) & 0xFF;
int currB = currColor & 0xFF;
// Extract red, green, and blue components from previous pixel
int prevR = (prevColor >> 16) & 0xFF;
int prevG = (prevColor >> 8) & 0xFF;
int prevB = prevColor & 0xFF;
// Compute the difference of the red, green, and blue values
int diffR = abs(currR - prevR);
int diffG = abs(currG - prevG);
int diffB = abs(currB - prevB);
// Render the difference image to the screen
color diff = color(diffR, diffG, diffB);
int isPointDiff = 0;
if (diff > -15000000) //-16777216
{
isPointDiff = 1;
++diffAmount;
}
diffPoints[abs(i / width)][i % width] = isPointDiff;
}
checkForNewPoint(diffAmount);
arraycopy(video.pixels, previousFrame);
}
void checkForNewPoint(int diffAmount)
{
int sensor = arduino.analogRead(0);
int sensor2 = arduino.analogRead(1);
if(diffAmount > 100000)
{
return;
}
float milliseconds = millis();
if (milliseconds < 1000) return;
if (diffAmount < 40) return;
int blocks = 0;
for (int i = 0; i < height; i++)
{
for (int j = 0; j < width; j++)
{
if(i > 1 && j > 1 && diffPoints[i][j] == 1)
{
if(diffPoints[i - 1][j] == 1 && diffPoints[i - 2][j] == 1
|| diffPoints[i][j - 1] == 1 && diffPoints[i][j - 2] == 1)
{
++blocks;
int randNum = 10;
int randX = int((randNum / 2) - random(randNum));
int randY = int((randNum / 2) - random(randNum));
color c = previousFrame[(i * width) + j];
fill(c, particleAlpha);
int particleSize = diffAmount / 700;
if(random(particleSize) > (particleSize - (.9999999 / particleSize)))
{
ellipse(j, i, particleMin + sensor, particleMin + sensor2);
}
}
}
}
}
}
void mousePressed() {
fill(255);
rect(0, 0, width, height);
}
Juegos
/*
Versión del juego clássico SPACE INVADERS programado para el taller
Processing y Arduino en CAMON de Alacant, que el autor impartido por
Quelic Berga, Daniel García i Joan Soler-Adillon
http://www.tucamon.es/contenido/processing-y-arduino
Autor: Joan Soler-Adillon [www.joan.cat]
Enero 2009
Licencia: Creative Commons, Attribution-Noncommercial-Share Alike 3.0 Unported
http://creativecommons.org/licenses/by-nc-sa/3.0/
Este programa está diseñado para ser utilitzado tanto por usuarios noveles como avanzados.
Para los primeros, existen una serie de variables al principio de todo (bajo el título de
"variables principales" que determinan todos los aspectos importantes de juego. Sólo manipulando
estos valores se verán cambios importantes en el juego.
*/
//////////////////////
// VARIABLES PRINCIPALES
//
//------PANTALLA------------:
//
//Ancho de la pantalla
int theWidth = 600;
//Alto de la pantalla
int theHeight = 400;
//
//------INVASORES------------:
//
//velocidad de los invasores
float invadersSpeed = 1;
//incremento de la velocidad cada vez que cambian de dirección
float invadersSpeedIncrement = 0.05;
//pixels que bajan cada vez que cambian de dirección
int invadersYStep = 4;
//
//------NAVE------------:
//
//distancia de la nave al borde inferior de la pantalla
int spaceShipDistanceToBottom = 25;
//velocidad a la que se mueve la nave
int spaceShipSpeed = 5;
//
//------BALAS------------:
//
//Velocidad a la que van las balas
int bulletSpeed = 4;
//Tiempo (en milisegundos) que ha de pasar desde que se disparó una bala
//hasta que se puede disparar otra
int delayBetweenBullets = 500;
//
////// FIN DE VARIABLES PRINCIPALES
//////////////////////////////////////////////////
//creamos los objetos para el juego
int numOfInvaders = 50;
invader[] invaders = new invader[numOfInvaders];
spaceShip nave = new spaceShip(theWidth/2, theHeight-spaceShipDistanceToBottom,spaceShipSpeed, delayBetweenBullets);
//imágenes
PImage spaceShip, bulletImage,invadersFrameOne,invadersFrameTwo;
ArrayList bulletsList = new ArrayList();
void setup(){
size(theWidth,theHeight);
imageMode(CENTER);
//cargamos imágenes
spaceShip = loadImage("nau.gif");
invadersFrameOne = loadImage("bitxo1.gif");
invadersFrameTwo = loadImage("bitxo2.gif");
bulletImage = loadImage("bala.gif");
spaceShipSpeed = 5;
bulletSpeed = 4;
//INICIALIZACION (esto funciona para 50 invasores a 10x5)
int invaderCount = 0;
for(int i=50;i<200;i+=30){
for(int j=75;j<550;j+=50){
invaders[invaderCount]=new invader(j,i,invaderCount, invadersSpeed, invadersSpeedIncrement, invadersYStep);
invaderCount++;
}
}
}
void draw(){
background(0);
for(int i=0;i<numOfInvaders;i++){
invaders[i].update();
}
nave.update();
if(bulletsList.size()>0){
for(int i=0; i<bulletsList.size();i++){
bullet _b = (bullet) bulletsList.get(i);
_b.update();
}
}
}
///////////CONTROL CON TECLADO
//cuando le damos a una tecla
void keyPressed(){
//miramos si es de las raras:
if (key == CODED) {
//y si lo es, si es la flecha izquierda o derecha
if (keyCode == LEFT) {
nave.decrementX();
}
else if (keyCode == RIGHT) {
nave.incrementX();
}
}
else {
//si le damos a la tecla espacio
if(key==' '){
nave.shoot();
}
}
}
Mas de 10 Video Tutoriales
Mas info Control con Arduino y Lenguaje Processing
http://processing.joan.cat/camon/10/indexcs.html
http://processing.joan.cat/camon/index.html
http://www.arduino.cc/playground/Interfacing/Processing
making video with arduino-processing
Lo que deseo es buscar entusiastas que quieran desarrollar o portar la biblioteca serial de Processing para microcontroladores PIC o Freescale
http://processing.org/reference/libraries/serial/
http://www.arduino.cc/playground/Interfacing/Processing
Ademas creo que los codigos creados por este lenguaje se ejecutan en Windows/Linux teniendo instalado JAVA
http://processing.joan.cat/camon/spaceInvadersCamon09/index.html
Redactando ...