JAVA & Systèmes
électroniques
ANDROID
http://www.android.com/
ARDUINO
http://arduino.cc/fr/Main/Materiel
JAVA COMMUNICATIONS API
Site web officiel :
http://www.oracle.com/technetwork/java/index-jsp-141752.html
http://www.oracle.com/technetwork/java/index-139971.html
http://docs.oracle.com/cd/E17802_01/products/products/javacomm/reference/api/index.html
http://www.oracle.com/us/technologies/java/javacomm-137197.html
http://www.particle.kth.se/~lindsey/JavaCourse/Book/Part3/Chapter23/commAPI.html
1- Telecharger l'API javax.comm (java comm)
http://code.google.com/p/smslib/downloads/detail?name=javacomm20-win32.zip&can=2&q
2- Placer les fichiers suivants aux placements indiqués :
comm.jar C:\Program Files\Java\jdk1.7.0\jre\lib\ext
win32com.dll C:\Program Files\Java\jdk1.7.0\jre\bin
javax.comm.properties C:\Program Files\Java\jdk1.7.0\jre\lib
3- Executer sur votre IDE préféré le code suivant:
import javax.comm.*;
import java.util.Enumeration;
public class ListPorts {
public static void main(String args[]) {
Enumeration ports = CommPortIdentifier.getPortIdentifiers();
while (ports.hasMoreElements()) {
CommPortIdentifier port = (CommPortIdentifier)ports.nextElement();
String type;
switch (port.getPortType()) {
case CommPortIdentifier.PORT_PARALLEL:
type = "Parallel";
break;
case CommPortIdentifier.PORT_SERIAL:
type = "Serial";
break;
default: /// Shouldn't happen
type = "Unknown";
break;
}
System.out.println(port.getName() + ": " + type);
}
}
}
4- Si vous avez une imprimante connectée sur le port parallèle
import javax.comm.*;
import java.io.*;
public class PrintFile {
public static void main(String args[]) throws Exception {
if (args.length != 2) {
System.err.println("usage : java PrintFile port file");
System.err.println("sample: java PrintFile LPT1 sample.ps");
System.exit(-1);
}
String portname = args[0];
String filename = args[1];
// Get port
CommPortIdentifier portId =
CommPortIdentifier.getPortIdentifier(portname);
// Open port
// Open requires a owner name and timeout
CommPort port = portId.open("PrintFile", 30000);
// Setup reading from file
FileReader fr = new FileReader(filename);
BufferedReader br = new BufferedReader(fr);
// Setup output
OutputStream os = port.getOutputStream();
BufferedOutputStream bos = new BufferedOutputStream(os);
int c;
while ((c = br.read()) != -1)
bos.write(c);
// Close
bos.close();
br.close();
port.close();
}
}
5- Réaliser le TP
http://christophej.developpez.com/tutoriel/java/javacomm/
Tester ce programme qui permet de lister les Ports :
import java.util.Enumeration;
import javax.comm.*;
import com.sun.comm.Win32Driver;
public class Test {
public static void main(String[] args) {
//initialisation du driver
Win32Driver w32Driver= new Win32Driver();
w32Driver.initialize();
//récupération de l'énumération
Enumeration portList=CommPortIdentifier.getPortIdentifiers();
//affichage des noms des ports
CommPortIdentifier portId;
while (portList.hasMoreElements()){
portId=(CommPortIdentifier)portList.nextElement();
System.out.println(portId.getName());
}
}
}
JAVA pour USB (Universal Serial Bus)
http://www.jcp.org/en/jsr/detail?id=80
JSR 80 (http://www.jcp.org/jsr/detail/80.jsp)
http://jusb.sourceforge.net/
http://javax-usb.org/
JAVA CARD
http://java.sun.com/javacard/3.0/javacard3_whitepaper.pdf
http://www.oracle.com/technetwork/articles/javase/javacard3-142122.html
SUN SPOT
http://sunspotworld.com/docs/Yellow/SunSPOT-Programmers-Manual.pdf
http://www.sunspotworld.com/
ARDUINO et ANDROID
http://allaboutee.com/2011/12/31/arduino-adk-board-blink-an-led-with-your-phone-code-and-explanation/
http://www.amarino-toolkit.net/
Moteur pas à pas
http://sitelec.org/cours/abati/motpas.htm
Raspberry Pi
http://www.raspberrypi.org/
http://en.wikipedia.org/wiki/Raspberry_Pi
LEJOS
http://lejos.sourceforge.net/
IOIO – Utiliser votre smartphone pour vos bricolages électroniques
http://android-france.fr/2011/04/11/ioio-utiliser-votre-smartphone-pour-vos-bricolages-electroniques/
http://www.semageek.com/ioio-une-carte-pour-connecter-un-peripherique-android-avec-un-nouveau-monde-electronique/
Liens web et Références :
http://www.materiel-informatique.be/
http://fabrice.sincere.pagesperso-orange.fr/electronique.htm
http://patrick.furon.free.fr/_elecnumerique/_cours_electronum/__PlanCoursElectronum.htm
Android + Kinect + Projector
http://phandroid.com/2012/01/24/android-kinect-projector-video/