SlideShare a Scribd company logo
PRESENTED BY
EDWIN RAMIREZ
TERRY MENA
NILSA FUENTES
This is a general purpose language, concurrent,
class-based and object oriented language
becomes completely independent of the
platform and the both powerful. That
philosophy and his ability to create
applications for TCP / IP has made it one of
the most used languages ​​today.
RESOURCES
To write Java programs needed to do the precompiled and interpretation of the code,
are environments that allow the creation of the bytecodes and tools include ability to
run applications of all kinds, the most famous Manual Java Developer Kit (JDK) from
Sun, However, writing and compiling programs used and is a bit uncomfortable. So
many companies make their own editing environments such as Netbeans, Eclipse. etc
1. Provide the Java Communications API control over any of the
devices. Before using a device, the API must know.
2. Opening the device and put the line speed, parity, etc.. required.
3. Write or read some data using the protocol specified for the device. For
example, if you have to communicate with a printer, you can send the
codes start and end of work.
4. Close the port.
USING COMMUNICATIONS API
Enumeration listaPuertos = CommPortIdentifier.getPortIdentifiers();
CommPortIdentifier idPuerto = null;
boolean encontrado = false;
while (listaPuertos.hasMoreElements() && !encontrado) {
idPuerto = (CommPortIdentifier) listaPuertos.nextElement();
if (idPuerto.getPortType() == CommPortIdentifier.PORT_SERIAL) {
if (idPuerto.getName().equals("COM1")) {
encontrado = true;
INITIALIZATION API WITH SERIAL
Enumeration listaPuertos = CommPortIdentifier.getPortIdentifiers();
CommPortIdentifier idPuerto = null;
boolean encontrado = false;
while (listaPuertos.hasMoreElements() && !encontrado) {
idPuerto = (CommPortIdentifier) listaPuertos.nextElement();
if (idPuerto.getPortType() == CommPortIdentifier.PORT_SERIAL) {
if (idPuerto.getName().equals("COM1")) {
encontrado = true;
INITIALIZATION API WITH SERIAL
InputStream input = null;
OutputStream out;
SerialPort puertoSerie = null;
public ControlPuertoSerie (String device, int baud, int timeout) throws
Exception { CommPortIdentifier idPuerto =
CommPortIdentifier.getPortIdentifier (device);
puertoSerie = (SerialPort) idPuerto.openPort ("PuertoSerie", timeout);
puertoSerie.setSerialPortParams(9600SerialPort.DATABITS_8,SerialPort.STOP
BITS_1,SerialPort.PARITY_NONE);
puertoSerie.setFlowcontrolMode(SerialPort.FLOWCTRL_NONE);
puertoSerie.enableRcvThreshold(1);
puertoSerie.enableRcvTimeout(timeout);
System.out.println ("Open Serial Device");
puertoSerie.getOutputStream out = ();
puertoSerie.getInputStream input = ();
OPENING AND CONDITIONING DEVICES
To write, you can do:
try { salida.write (arraySalida, 0, length);
And for reading data, you only have to do:
try { int b = entrada.read ()
CLOSING PORTS
try { entrada.close ();
output.close (); }
WRITING AND READING DATA

More Related Content

What's hot

Types of errors 2019
Types of errors 2019Types of errors 2019
Types of errors 2019
Osama Ghandour Geris
 
Swift Introduction
Swift IntroductionSwift Introduction
Swift Introduction
Savvycom Savvycom
 
Final requirement for programming-Bonifacio, Mary Clemence
Final requirement for programming-Bonifacio, Mary ClemenceFinal requirement for programming-Bonifacio, Mary Clemence
Final requirement for programming-Bonifacio, Mary Clemence
clemencebonifacio
 
Programming with \'C\'
Programming with \'C\'Programming with \'C\'
Programming with \'C\'
bdmsts
 
Computer programming tools and building process
Computer programming tools and building processComputer programming tools and building process
Computer programming tools and building process
ArghodeepPaul
 
Programming Methodology
Programming MethodologyProgramming Methodology
Programming Methodology
archikabhatia
 
Error Detection & Recovery
Error Detection & RecoveryError Detection & Recovery
Error Detection & Recovery
Akhil Kaushik
 
Intro cpp
Intro cppIntro cpp
Intro cpp
hamza239523
 
Theory of programming
Theory of programmingTheory of programming
Theory of programming
tcc_joemarie
 
Mark asoi ppt
Mark asoi pptMark asoi ppt
Mark asoi ppt
mark-asoi
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languages
Varun Garg
 
Tips for Happier Python Debugging
Tips for Happier Python DebuggingTips for Happier Python Debugging
Tips for Happier Python Debugging
Chun-Hao Chang
 
Project two c++ tutorial
Project two c++ tutorialProject two c++ tutorial
Project two c++ tutorial
Babatunde Salaam
 
Welcome to the .Net
Welcome to the .NetWelcome to the .Net
Welcome to the .Net
Amr Shawky
 
What's coming to c# (Tel-Aviv, 2018)
What's coming to c# (Tel-Aviv, 2018)What's coming to c# (Tel-Aviv, 2018)
What's coming to c# (Tel-Aviv, 2018)
Moaid Hathot
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Ranjith kumar
 
Switch case looping
Switch case loopingSwitch case looping
Switch case looping
Cherimay Batallones
 
Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator
Alessio Ricco
 
Computer languages
Computer languagesComputer languages
Computer languages
Prince Arsal
 
Introduction to programming languages part 1
Introduction to programming languages   part 1Introduction to programming languages   part 1
Introduction to programming languages part 1
university of education,Lahore
 

What's hot (20)

Types of errors 2019
Types of errors 2019Types of errors 2019
Types of errors 2019
 
Swift Introduction
Swift IntroductionSwift Introduction
Swift Introduction
 
Final requirement for programming-Bonifacio, Mary Clemence
Final requirement for programming-Bonifacio, Mary ClemenceFinal requirement for programming-Bonifacio, Mary Clemence
Final requirement for programming-Bonifacio, Mary Clemence
 
Programming with \'C\'
Programming with \'C\'Programming with \'C\'
Programming with \'C\'
 
Computer programming tools and building process
Computer programming tools and building processComputer programming tools and building process
Computer programming tools and building process
 
Programming Methodology
Programming MethodologyProgramming Methodology
Programming Methodology
 
Error Detection & Recovery
Error Detection & RecoveryError Detection & Recovery
Error Detection & Recovery
 
Intro cpp
Intro cppIntro cpp
Intro cpp
 
Theory of programming
Theory of programmingTheory of programming
Theory of programming
 
Mark asoi ppt
Mark asoi pptMark asoi ppt
Mark asoi ppt
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languages
 
Tips for Happier Python Debugging
Tips for Happier Python DebuggingTips for Happier Python Debugging
Tips for Happier Python Debugging
 
Project two c++ tutorial
Project two c++ tutorialProject two c++ tutorial
Project two c++ tutorial
 
Welcome to the .Net
Welcome to the .NetWelcome to the .Net
Welcome to the .Net
 
What's coming to c# (Tel-Aviv, 2018)
What's coming to c# (Tel-Aviv, 2018)What's coming to c# (Tel-Aviv, 2018)
What's coming to c# (Tel-Aviv, 2018)
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Switch case looping
Switch case loopingSwitch case looping
Switch case looping
 
Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator
 
Computer languages
Computer languagesComputer languages
Computer languages
 
Introduction to programming languages part 1
Introduction to programming languages   part 1Introduction to programming languages   part 1
Introduction to programming languages part 1
 

Viewers also liked

Drug research beyond imagination
Drug research   beyond imaginationDrug research   beyond imagination
Drug research beyond imaginationBambang Priyambodo
 
Media pharmaindonesiaii 2011
Media pharmaindonesiaii 2011Media pharmaindonesiaii 2011
Media pharmaindonesiaii 2011
Bambang Priyambodo
 
Petunjuk tehnik cpotb
Petunjuk tehnik cpotbPetunjuk tehnik cpotb
Petunjuk tehnik cpotb
Bambang Priyambodo
 
งานนำเสนอ1
งานนำเสนอ1งานนำเสนอ1
งานนำเสนอ1
jarintorn
 
Peraturan Kepala Badan POM tentang sertifikasi CPOB
Peraturan Kepala Badan POM tentang sertifikasi  CPOBPeraturan Kepala Badan POM tentang sertifikasi  CPOB
Peraturan Kepala Badan POM tentang sertifikasi CPOB
Bambang Priyambodo
 
Peraturan Kepala Badan POM tentang obat wajib uji ekivalen
Peraturan Kepala Badan POM tentang obat wajib uji ekivalenPeraturan Kepala Badan POM tentang obat wajib uji ekivalen
Peraturan Kepala Badan POM tentang obat wajib uji ekivalen
Bambang Priyambodo
 
Permenkes 1799 2010
Permenkes 1799 2010Permenkes 1799 2010
Permenkes 1799 2010
Bambang Priyambodo
 

Viewers also liked (7)

Drug research beyond imagination
Drug research   beyond imaginationDrug research   beyond imagination
Drug research beyond imagination
 
Media pharmaindonesiaii 2011
Media pharmaindonesiaii 2011Media pharmaindonesiaii 2011
Media pharmaindonesiaii 2011
 
Petunjuk tehnik cpotb
Petunjuk tehnik cpotbPetunjuk tehnik cpotb
Petunjuk tehnik cpotb
 
งานนำเสนอ1
งานนำเสนอ1งานนำเสนอ1
งานนำเสนอ1
 
Peraturan Kepala Badan POM tentang sertifikasi CPOB
Peraturan Kepala Badan POM tentang sertifikasi  CPOBPeraturan Kepala Badan POM tentang sertifikasi  CPOB
Peraturan Kepala Badan POM tentang sertifikasi CPOB
 
Peraturan Kepala Badan POM tentang obat wajib uji ekivalen
Peraturan Kepala Badan POM tentang obat wajib uji ekivalenPeraturan Kepala Badan POM tentang obat wajib uji ekivalen
Peraturan Kepala Badan POM tentang obat wajib uji ekivalen
 
Permenkes 1799 2010
Permenkes 1799 2010Permenkes 1799 2010
Permenkes 1799 2010
 

Similar to Expo java

Arduino LED maXbox starter18_3
Arduino LED maXbox starter18_3Arduino LED maXbox starter18_3
Arduino LED maXbox starter18_3
Max Kleiner
 
Code and Conquer with Globe Labs, October 27, 2012
Code and Conquer with Globe Labs, October 27, 2012Code and Conquer with Globe Labs, October 27, 2012
Code and Conquer with Globe Labs, October 27, 2012
jobandesther
 
Srgoc java
Srgoc javaSrgoc java
Srgoc java
Gaurav Singh
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
Learnbay Datascience
 
delphi-interfaces.pdf
delphi-interfaces.pdfdelphi-interfaces.pdf
delphi-interfaces.pdf
delphi-interfaces.pdfdelphi-interfaces.pdf
delphi-interfaces.pdf
delphi-interfaces.pdfdelphi-interfaces.pdf
Maxbox starter18
Maxbox starter18Maxbox starter18
Maxbox starter18
Max Kleiner
 
maXbox Arduino Tutorial
maXbox Arduino TutorialmaXbox Arduino Tutorial
maXbox Arduino Tutorial
Max Kleiner
 
180 daraga cpp course session-1
180 daraga cpp course session-1180 daraga cpp course session-1
180 daraga cpp course session-1
Moustafa Ghoniem
 
Scripting in OpenOffice.org
Scripting in OpenOffice.orgScripting in OpenOffice.org
Scripting in OpenOffice.org
Alexandro Colorado
 
Source-to-Source Compiler
Source-to-Source CompilerSource-to-Source Compiler
Source-to-Source Compiler
Mintoo Jakhmola
 
Advanced Java Topics
Advanced Java TopicsAdvanced Java Topics
Advanced Java Topics
Salahaddin University-Erbil
 
Interfacing With High Level Programming Language
Interfacing With High Level Programming Language Interfacing With High Level Programming Language
Interfacing With High Level Programming Language
.AIR UNIVERSITY ISLAMABAD
 
La 5 Pl Translator
La 5   Pl TranslatorLa 5   Pl Translator
La 5 Pl Translator
Cma Mohd
 
FINAL.ppt
FINAL.pptFINAL.ppt
FINAL.ppt
DeveshKatiyar5
 
How a Compiler Works ?
How a Compiler Works ?How a Compiler Works ?
How a Compiler Works ?
Hirdesh Vishwdewa
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and development
Ali Raza
 
Phone gap development, testing, and debugging
Phone gap development, testing, and debuggingPhone gap development, testing, and debugging
Phone gap development, testing, and debugging
Kongu Engineering College, Perundurai, Erode
 
BIS07 Application Development - I
BIS07 Application Development - IBIS07 Application Development - I
BIS07 Application Development - I
Prithwis Mukerjee
 

Similar to Expo java (20)

Arduino LED maXbox starter18_3
Arduino LED maXbox starter18_3Arduino LED maXbox starter18_3
Arduino LED maXbox starter18_3
 
Code and Conquer with Globe Labs, October 27, 2012
Code and Conquer with Globe Labs, October 27, 2012Code and Conquer with Globe Labs, October 27, 2012
Code and Conquer with Globe Labs, October 27, 2012
 
Srgoc java
Srgoc javaSrgoc java
Srgoc java
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 
delphi-interfaces.pdf
delphi-interfaces.pdfdelphi-interfaces.pdf
delphi-interfaces.pdf
 
delphi-interfaces.pdf
delphi-interfaces.pdfdelphi-interfaces.pdf
delphi-interfaces.pdf
 
delphi-interfaces.pdf
delphi-interfaces.pdfdelphi-interfaces.pdf
delphi-interfaces.pdf
 
Maxbox starter18
Maxbox starter18Maxbox starter18
Maxbox starter18
 
maXbox Arduino Tutorial
maXbox Arduino TutorialmaXbox Arduino Tutorial
maXbox Arduino Tutorial
 
180 daraga cpp course session-1
180 daraga cpp course session-1180 daraga cpp course session-1
180 daraga cpp course session-1
 
Scripting in OpenOffice.org
Scripting in OpenOffice.orgScripting in OpenOffice.org
Scripting in OpenOffice.org
 
Source-to-Source Compiler
Source-to-Source CompilerSource-to-Source Compiler
Source-to-Source Compiler
 
Advanced Java Topics
Advanced Java TopicsAdvanced Java Topics
Advanced Java Topics
 
Interfacing With High Level Programming Language
Interfacing With High Level Programming Language Interfacing With High Level Programming Language
Interfacing With High Level Programming Language
 
La 5 Pl Translator
La 5   Pl TranslatorLa 5   Pl Translator
La 5 Pl Translator
 
FINAL.ppt
FINAL.pptFINAL.ppt
FINAL.ppt
 
How a Compiler Works ?
How a Compiler Works ?How a Compiler Works ?
How a Compiler Works ?
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and development
 
Phone gap development, testing, and debugging
Phone gap development, testing, and debuggingPhone gap development, testing, and debugging
Phone gap development, testing, and debugging
 
BIS07 Application Development - I
BIS07 Application Development - IBIS07 Application Development - I
BIS07 Application Development - I
 

Recently uploaded

World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
sayalidalavi006
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
simonomuemu
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 

Recently uploaded (20)

World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 

Expo java

  • 1. PRESENTED BY EDWIN RAMIREZ TERRY MENA NILSA FUENTES
  • 2. This is a general purpose language, concurrent, class-based and object oriented language becomes completely independent of the platform and the both powerful. That philosophy and his ability to create applications for TCP / IP has made it one of the most used languages ​​today.
  • 3. RESOURCES To write Java programs needed to do the precompiled and interpretation of the code, are environments that allow the creation of the bytecodes and tools include ability to run applications of all kinds, the most famous Manual Java Developer Kit (JDK) from Sun, However, writing and compiling programs used and is a bit uncomfortable. So many companies make their own editing environments such as Netbeans, Eclipse. etc
  • 4. 1. Provide the Java Communications API control over any of the devices. Before using a device, the API must know. 2. Opening the device and put the line speed, parity, etc.. required. 3. Write or read some data using the protocol specified for the device. For example, if you have to communicate with a printer, you can send the codes start and end of work. 4. Close the port. USING COMMUNICATIONS API
  • 5. Enumeration listaPuertos = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier idPuerto = null; boolean encontrado = false; while (listaPuertos.hasMoreElements() && !encontrado) { idPuerto = (CommPortIdentifier) listaPuertos.nextElement(); if (idPuerto.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (idPuerto.getName().equals("COM1")) { encontrado = true; INITIALIZATION API WITH SERIAL
  • 6. Enumeration listaPuertos = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier idPuerto = null; boolean encontrado = false; while (listaPuertos.hasMoreElements() && !encontrado) { idPuerto = (CommPortIdentifier) listaPuertos.nextElement(); if (idPuerto.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (idPuerto.getName().equals("COM1")) { encontrado = true; INITIALIZATION API WITH SERIAL
  • 7. InputStream input = null; OutputStream out; SerialPort puertoSerie = null; public ControlPuertoSerie (String device, int baud, int timeout) throws Exception { CommPortIdentifier idPuerto = CommPortIdentifier.getPortIdentifier (device); puertoSerie = (SerialPort) idPuerto.openPort ("PuertoSerie", timeout); puertoSerie.setSerialPortParams(9600SerialPort.DATABITS_8,SerialPort.STOP BITS_1,SerialPort.PARITY_NONE); puertoSerie.setFlowcontrolMode(SerialPort.FLOWCTRL_NONE); puertoSerie.enableRcvThreshold(1); puertoSerie.enableRcvTimeout(timeout); System.out.println ("Open Serial Device"); puertoSerie.getOutputStream out = (); puertoSerie.getInputStream input = (); OPENING AND CONDITIONING DEVICES
  • 8. To write, you can do: try { salida.write (arraySalida, 0, length); And for reading data, you only have to do: try { int b = entrada.read () CLOSING PORTS try { entrada.close (); output.close (); } WRITING AND READING DATA