The Arduino is what is known as a Physical or Embedded Computing platform, which means that it is an interactive system that through the use of hardware, firmware and software can interact with its environment.
We code a RGB LED light on the Arduino board and a breadboard on which we switch off or on the light by a browser on an android device with our own web server and their COM protocols.
PHYSICAL COMPUTING WITH RGB LED OR MATRIX
Today we enter a topic in programming called
embedded computing with the internet; we code a
RGB LED light on a Arduino board with a breadboard
on which we switch off or on the light by a browser
on an android device with our own web server and
their COM or socket protocols too.
1. The document discusses using an Arduino board to control an LED light via a web server and browser. It provides code to set up an HTTP server on the Arduino that can turn the LED on or off by sending GET requests from a browser to specific URLs.
2. The code creates an TIdCustomHTTPServer object to set up the web server on the Arduino. It configures the server port and IP address. GET requests to URLs like 127.0.0.1:8000/LED will turn the LED on, while 127.0.0.1:8000/DEL will turn it off.
3. The document provides background on topics like HTTP, TCP/IP, IP addresses
This document provides an introduction to C++ programming. It begins with definitions of a computer, programming, and the C++ programming process. It then discusses hardware components like the CPU, memory, and input/output devices. It also covers software components like programming languages, operating systems, and the C++ development process. The document provides examples of C++ code and explanations of language features like variables, operators, and data types. It concludes with an overview of getting started with C++ input/output functions.
There are three main topics in here. First technologies – simply put, this part is mainly for early adopters. It’s about coding, developing toys, plugging in kettles on the web (and we and many others actually did that!).
The second part is about new ideas, prototyping and new technologies that are in the lab. It’s about research papers, and software philosophy, and about researchers worldwide. Third part is about end-users and products.
The document provides an introduction to web design and PHP. It defines key concepts like the World Wide Web, web browsers, URLs, and domain names. It explains that the web uses a client-server model where web servers store files and web clients (browsers) access them. PHP is introduced as a widely-used scripting language that allows dynamic content generation and interaction with databases on the server-side. PHP code is executed on the server and the results are returned as HTML to the client.
This document describes how to create a simple chat room using Python sockets and threading. It involves running a server script that initializes a socket to listen for client connections on a specified port. When a client connects, the server creates a thread to handle communication with that client. The client script connects to the server socket and allows sending and receiving messages that are broadcast to all connected clients. The chat room can be used locally on a private network or accessed remotely over the internet using port forwarding.
Networking involves connecting computing devices together to share resources using a mix of hardware and software. Devices are uniquely identified on a network using IP addresses. There are several layers in the networking model including the physical, link, network, transport, and application layers. The application layer contains protocols like HTTP, FTP, and SMTP that are used by user programs. URLs contain the protocol, hostname, port, and filename to uniquely identify resources. Sockets provide connections between applications to allow data transfer using protocols like TCP and UDP.
This chapter discusses key concepts of network programming and socket-based communication between programs running on different computers. It introduces the java.net package and classes used for creating sockets and allowing message communication using TCP and UDP protocols. Example programs are provided to demonstrate how to create basic client-server applications using sockets in Java.
The Presentation given at Guru Gobind Singh Polytechnic, Nashik for Third Year Information Technology and Computer Engineering Students on 08/02/2011.
Topic: Java Network Programming
This document discusses network programming and Java sockets. It begins with an introduction to client-server computing and networking basics like TCP, UDP, and ports. It then covers Java sockets in detail, including how to implement a server that can accept multiple clients by creating a new thread for each, and how to implement a client. Sample code is provided for a simple single-threaded server and client. The document concludes that programming client-server applications in Java using sockets is easier than in other languages like C.
1. Sockets provide a connection between client and server programs that allows them to communicate over a network. A socket is bound to each end of the connection.
2. The Socket class implements client sockets and allows a client program to connect to a server, send and receive data, and close the connection. The ServerSocket class allows a server program to listen for connections on a port and accept sockets from clients.
3. When a client connects to a server, the server accepts the connection using ServerSocket and returns a Socket. The client and server can then communicate by getting input and output streams from the socket to send data over the connection according to the network protocol.
This document provides an overview of sockets programming in Python. It discusses the basic Python sockets modules, including the Socket module which provides a low-level networking interface based on the BSD sockets API, and the SocketServer module which simplifies the development of network servers. It also provides examples of creating server and client sockets in Python and performing basic I/O operations. The document demonstrates how to create TCP and UDP sockets, bind addresses, listen for connections, accept clients, and send/receive data.
This document discusses Java networking and client/server communication. A client machine makes requests to a server machine over a network using protocols like TCP and UDP. TCP provides reliable data transmission while UDP sends independent data packets. Port numbers map incoming data to running processes. Sockets provide an interface for programming networks, with ServerSocket and Socket classes in Java. A server program listens on a port for client connections and exchanges data through input/output streams. Servlets extend web server functionality by executing Java programs in response to client requests.
This document provides an overview of networking concepts in Java including TCP/IP and UDP protocols, internet addressing, sockets, URLs, and how to implement client-server communication using TCP and UDP sockets. Key topics covered include the difference between TCP and UDP, how sockets connect applications to networks, internet addressing with IPv4 and IPv6, and examples of writing basic TCP and UDP client-server programs in Java.
The presentation given at MSBTE sponsored content updating program on 'Advanced Java Programming' for Diploma Engineering teachers of Maharashtra. Venue: Guru Gobind Singh Polytechnic, Nashik
Date: 22/12/2010
Session: Java Network Programming
This document discusses Java networking concepts and classes. It begins with an overview of sockets and protocols like TCP and IP. It then describes the InetAddress class for representing IP addresses and domain names. Client sockets using the Socket class are explained for connecting to servers. The core networking classes in java.net are listed, including Socket, ServerSocket, and InetAddress. An example program demonstrates looking up domain information using a Socket to connect to a WHOIS server.
This document provides an overview of networking concepts in Java. It discusses socket programming, client-server models, Internet addressing using IPv4 and IPv6, common network ports, proxy servers, and the core Java networking classes like InetAddress and URLConnection that support network communication. The document serves as an introduction to networking basics and how Java implements network functionality through its java.net package.
Socket programming in Java allows applications to communicate over the internet. Sockets are endpoints for communication that are identified by an IP address and port number. A socket connection is established between a client and server socket. The server creates a welcoming socket to accept client connection requests, then a separate connection socket to communicate with that client. Data can be sent bidirectionally over the connected sockets as input/output streams. UDP uses datagram sockets without a connection, requiring the explicit destination address on each message.
This document provides an overview of networking concepts in Java including:
1) It outlines topics on networking basics like IP addresses, ports, protocols and client-server interactions.
2) It describes how to write networking clients and servers using sockets.
3) It provides an example of writing a simple ICQ client-server application to demonstrate sockets.
4) It discusses communicating with web servers by retrieving and sending information using URLs and URLConnections.
This document provides an overview of network protocols in Java. It begins with an introduction to networking concepts like protocols, clients, servers and the internet protocol stack. It then discusses socket programming in Java using TCP and UDP. Examples are provided of a simple TCP client-server application that converts text to uppercase and a UDP client-server that sends and receives datagrams. The document aims to teach how to build networked applications in Java using common network protocols.
This document discusses TCP/IP networking concepts in Java like sockets, datagrams, ports and protocols. It provides code examples for socket programming in Java using TCP for client-server applications and UDP for datagram transmissions. It also recommends books that cover Java networking topics in more detail.
This document discusses application layer protocols. It provides an overview of the architecture of the World Wide Web including how web pages are composed of multiple objects accessed via URLs. It also summarizes HTTP, describing its request/response paradigm and stateless nature. Additionally, it covers FTP for file transfer between clients and servers, including its use of separate control and data connections, and Telnet for remote login sessions.
The document discusses network programming and Java sockets. It introduces elements of client-server computing including networking basics like TCP, UDP and ports. It then covers Java sockets, explaining how to implement both a server and client using Java sockets. Code examples are provided of a simple server and client. The conclusion emphasizes that Java makes socket programming easier than other languages like C.
This document provides an overview of socket programming in Java. It defines a socket as an endpoint for two-way communication between programs over a network. The key classes for socket programming in Java are Socket for clients and ServerSocket for servers. It describes how to establish connections between clients and servers using these classes, set up input and output streams, and properly close connections. TCP sockets provide reliable, ordered connections while UDP sockets are unreliable and unordered. Exceptions that can occur during network programming are also listed.
This document provides an overview of Java sockets including how they allow for client-server communication over networks, the lifecycle of a socket server, and code examples for a socket server and clients. It discusses how sockets provide connection-oriented and connectionless services in Java using classes like ServerSocket and Socket. Diagrams depict the use cases and classes for a socket server that handles weather requests from multiple clients. Code for a WeatherSocketServer class and examples of client requests are also included.
This document provides an overview of client-server networking concepts in Java. It discusses elements like network basics, ports and sockets. It explains how to implement both TCP and UDP clients and servers in Java using socket classes. Sample code is provided for an echo client-server application using TCP and a quote client-server application using UDP. Exception handling for sockets is also demonstrated.
Alleantia - internet of things for enterprises - enabling data-driven organiz...Antonio Conati Barbaro
Overview of Alleantia strategy and solutions enabling Internet-of-Things capabilities for data-driven Enterprise business processes, for Equipment manufacturers' and any other corporate. Alleantia has developed an innovative method ('mapping of the DNA of Things) for creating software objects of any device, existing and new, and a IoT Application Platform for creating devices and applications.
Presentation shown in Q4 2013 at Pioneers', Webit, Slush, IVF and EVS.
This chapter discusses key concepts of network programming and socket-based communication between programs running on different computers. It introduces the java.net package and classes used for creating sockets and allowing message communication using TCP and UDP protocols. Example programs are provided to demonstrate how to create basic client-server applications using sockets in Java.
The Presentation given at Guru Gobind Singh Polytechnic, Nashik for Third Year Information Technology and Computer Engineering Students on 08/02/2011.
Topic: Java Network Programming
This document discusses network programming and Java sockets. It begins with an introduction to client-server computing and networking basics like TCP, UDP, and ports. It then covers Java sockets in detail, including how to implement a server that can accept multiple clients by creating a new thread for each, and how to implement a client. Sample code is provided for a simple single-threaded server and client. The document concludes that programming client-server applications in Java using sockets is easier than in other languages like C.
1. Sockets provide a connection between client and server programs that allows them to communicate over a network. A socket is bound to each end of the connection.
2. The Socket class implements client sockets and allows a client program to connect to a server, send and receive data, and close the connection. The ServerSocket class allows a server program to listen for connections on a port and accept sockets from clients.
3. When a client connects to a server, the server accepts the connection using ServerSocket and returns a Socket. The client and server can then communicate by getting input and output streams from the socket to send data over the connection according to the network protocol.
This document provides an overview of sockets programming in Python. It discusses the basic Python sockets modules, including the Socket module which provides a low-level networking interface based on the BSD sockets API, and the SocketServer module which simplifies the development of network servers. It also provides examples of creating server and client sockets in Python and performing basic I/O operations. The document demonstrates how to create TCP and UDP sockets, bind addresses, listen for connections, accept clients, and send/receive data.
This document discusses Java networking and client/server communication. A client machine makes requests to a server machine over a network using protocols like TCP and UDP. TCP provides reliable data transmission while UDP sends independent data packets. Port numbers map incoming data to running processes. Sockets provide an interface for programming networks, with ServerSocket and Socket classes in Java. A server program listens on a port for client connections and exchanges data through input/output streams. Servlets extend web server functionality by executing Java programs in response to client requests.
This document provides an overview of networking concepts in Java including TCP/IP and UDP protocols, internet addressing, sockets, URLs, and how to implement client-server communication using TCP and UDP sockets. Key topics covered include the difference between TCP and UDP, how sockets connect applications to networks, internet addressing with IPv4 and IPv6, and examples of writing basic TCP and UDP client-server programs in Java.
The presentation given at MSBTE sponsored content updating program on 'Advanced Java Programming' for Diploma Engineering teachers of Maharashtra. Venue: Guru Gobind Singh Polytechnic, Nashik
Date: 22/12/2010
Session: Java Network Programming
This document discusses Java networking concepts and classes. It begins with an overview of sockets and protocols like TCP and IP. It then describes the InetAddress class for representing IP addresses and domain names. Client sockets using the Socket class are explained for connecting to servers. The core networking classes in java.net are listed, including Socket, ServerSocket, and InetAddress. An example program demonstrates looking up domain information using a Socket to connect to a WHOIS server.
This document provides an overview of networking concepts in Java. It discusses socket programming, client-server models, Internet addressing using IPv4 and IPv6, common network ports, proxy servers, and the core Java networking classes like InetAddress and URLConnection that support network communication. The document serves as an introduction to networking basics and how Java implements network functionality through its java.net package.
Socket programming in Java allows applications to communicate over the internet. Sockets are endpoints for communication that are identified by an IP address and port number. A socket connection is established between a client and server socket. The server creates a welcoming socket to accept client connection requests, then a separate connection socket to communicate with that client. Data can be sent bidirectionally over the connected sockets as input/output streams. UDP uses datagram sockets without a connection, requiring the explicit destination address on each message.
This document provides an overview of networking concepts in Java including:
1) It outlines topics on networking basics like IP addresses, ports, protocols and client-server interactions.
2) It describes how to write networking clients and servers using sockets.
3) It provides an example of writing a simple ICQ client-server application to demonstrate sockets.
4) It discusses communicating with web servers by retrieving and sending information using URLs and URLConnections.
This document provides an overview of network protocols in Java. It begins with an introduction to networking concepts like protocols, clients, servers and the internet protocol stack. It then discusses socket programming in Java using TCP and UDP. Examples are provided of a simple TCP client-server application that converts text to uppercase and a UDP client-server that sends and receives datagrams. The document aims to teach how to build networked applications in Java using common network protocols.
This document discusses TCP/IP networking concepts in Java like sockets, datagrams, ports and protocols. It provides code examples for socket programming in Java using TCP for client-server applications and UDP for datagram transmissions. It also recommends books that cover Java networking topics in more detail.
This document discusses application layer protocols. It provides an overview of the architecture of the World Wide Web including how web pages are composed of multiple objects accessed via URLs. It also summarizes HTTP, describing its request/response paradigm and stateless nature. Additionally, it covers FTP for file transfer between clients and servers, including its use of separate control and data connections, and Telnet for remote login sessions.
The document discusses network programming and Java sockets. It introduces elements of client-server computing including networking basics like TCP, UDP and ports. It then covers Java sockets, explaining how to implement both a server and client using Java sockets. Code examples are provided of a simple server and client. The conclusion emphasizes that Java makes socket programming easier than other languages like C.
This document provides an overview of socket programming in Java. It defines a socket as an endpoint for two-way communication between programs over a network. The key classes for socket programming in Java are Socket for clients and ServerSocket for servers. It describes how to establish connections between clients and servers using these classes, set up input and output streams, and properly close connections. TCP sockets provide reliable, ordered connections while UDP sockets are unreliable and unordered. Exceptions that can occur during network programming are also listed.
This document provides an overview of Java sockets including how they allow for client-server communication over networks, the lifecycle of a socket server, and code examples for a socket server and clients. It discusses how sockets provide connection-oriented and connectionless services in Java using classes like ServerSocket and Socket. Diagrams depict the use cases and classes for a socket server that handles weather requests from multiple clients. Code for a WeatherSocketServer class and examples of client requests are also included.
This document provides an overview of client-server networking concepts in Java. It discusses elements like network basics, ports and sockets. It explains how to implement both TCP and UDP clients and servers in Java using socket classes. Sample code is provided for an echo client-server application using TCP and a quote client-server application using UDP. Exception handling for sockets is also demonstrated.
Alleantia - internet of things for enterprises - enabling data-driven organiz...Antonio Conati Barbaro
Overview of Alleantia strategy and solutions enabling Internet-of-Things capabilities for data-driven Enterprise business processes, for Equipment manufacturers' and any other corporate. Alleantia has developed an innovative method ('mapping of the DNA of Things) for creating software objects of any device, existing and new, and a IoT Application Platform for creating devices and applications.
Presentation shown in Q4 2013 at Pioneers', Webit, Slush, IVF and EVS.
The document discusses the growth of the Internet of Things (IoT) market and Alleantia's solution for connecting heterogeneous IoT devices. By 2020, the global IoT impact is projected to be $4.5 trillion and between $2.5-6 trillion by 2025. Alleantia has developed a platform called X-PANGO that can "virtualize" and map IoT devices to enable them to connect and interact with each other and cloud applications out of the box. Alleantia currently has over 150 deployed systems with 2,500 connected devices across two product lines in Italy.
Sistema de pesagem em trefiladeiras com automação e integrado a erp de terceirosVic Fernandes
A TKS Software fornece soluções de automação e integração entre sistemas de produção e ERPs para controle e rastreabilidade de produção em trefiladeiras. O sistema permite a seleção e entrada de dados de produção, pesagem e controle automatizado do processo de produção com integração em tempo real dos dados no ERP do cliente.
Este documento describe los principales mecanismos de participación ciudadana establecidos en la Constitución colombiana de 1991, incluyendo el voto, plebiscito, referendo, consulta popular, cabildo abierto, iniciativa legislativa, revocatoria del mandato y acción de tutela. El objetivo de estos mecanismos es garantizar e incentivar la participación del pueblo colombiano en la toma de decisiones y resolución de problemas que afectan el bien común.
Este documento resume los principales mecanismos de participación ciudadana establecidos en la Ley 134 de 1994 de Colombia, incluyendo la iniciativa popular, el referendo, la consulta popular, la revocatoria del mandato, el plebiscito y el cabildo abierto. Define cada mecanismo y establece sus normas fundamentales.
Mecanismos de participación Ciudadana - ColombiaJorg Torrez
El documento describe el voto como el principal mecanismo de participación ciudadana en Colombia, mediante el cual los ciudadanos eligen representantes en corporaciones públicas. Explica que el voto es personal, libre y secreto según la Constitución de 1991. También define los tipos de voto (válido, nulo, recurrido, identidad pugnada) y analiza las ventajas e inconvenientes de este mecanismo para la democracia.
Sistema de pesagem balança rodoviária com automação e integrado a erp de terc...Vic Fernandes
O documento descreve os serviços e soluções de automação e integração de sistemas de pesagem em balanças rodoviárias oferecidos pela empresa TKS Software, incluindo o controle e rastreabilidade do processo de carga e descarga de caminhões, a integração em tempo real com sistemas ERP de clientes e a otimização do fluxo logístico por meio da automação.
Este documento describe los mecanismos de participación ciudadana establecidos en la Constitución de Venezuela, incluyendo el voto, el referéndum, la consulta popular, la revocatoria de mandato, el cabildo abierto y la asamblea de ciudadanos. Estos mecanismos aseguran la participación de los ciudadanos en la toma de decisiones y resolución de problemas que afectan al bien común. La participación ciudadana es un elemento fundamental consagrado en la Constitución venezolana.
CodeRage XI international Conference: Arduino + Delphi Mobile Apps Vic Fernandes
This is the playback of my CodeRage XI international Conference lecture speaking about Arduino + Delphi Mobile Apps
This presentation was done in 9 cities around Brazil for the ExtremeDelphi event during 2016 and also in Rome-Italy at the ITDevCon event.
Very happy to be speaking for the first time at the CodeRage!!! Only great speakers and hundreds of attendees from all around the world! Wow!
Este documento discute as regulamentações de pesos e dimensões para veículos de carga no Brasil. Ele explica termos como PBT, PBTC e CMT que definem limites de peso total, peso total combinado e capacidade máxima de tração. Também descreve configurações de eixos e suspensões, além de dimensões como distância entre eixos, bitola e altura máxima permitidas pela legislação brasileira.
Participacion ciudadana y otros permisos administrativosguilleramos190682
Este documento describe los mecanismos de participación ciudadana y permisos administrativos requeridos para proyectos mineros en Perú. Explica que la participación ciudadana se rige por el Decreto Supremo No 028-2008-EM y la Resolución Ministerial No 304-2008-MEM-DM. También detalla los permisos necesarios como el Certificado de Operación Minera, la Constancia de Inexistencia de Restos Arqueológicos, derechos de uso de agua y autorización de vertimientos.
Este documento establece las pautas para la participación ciudadana en proyectos mineros en Perú. Define la participación ciudadana como un proceso que permite conocer las opiniones de la población sobre proyectos mineros y promover el diálogo. Detalla los derechos a la participación, acceso a información y no discriminación. También explica los mecanismos de participación ciudadana como talleres y audiencias públicas, así como el monitoreo y vigilancia participativos de proyectos mineros.
RGB LED in Arduino with an Oscilloscope
• Generating QR Code
• 3D Printing
• Web Video Cam
• Digi Clock with Real Time Clock
• Android SeekBar to Arduino LED Matrix
Established in 1997 in the US, InduSoft is a pioneer in the HMI/SCADA industry. It was the first to introduce an HMI/SCADA package for Microsoft Windows CE and integrate web solutions and XML. InduSoft has over 240 native device drivers, supports multiple operating systems, and provides data acquisition, graphical visualization, background tasks, and mobile access capabilities.
The document discusses socket programming in Java and describes how to create basic client-server applications. It covers key concepts like TCP/IP networking stack, sockets, ports, and the java.net package. It provides examples of TCP and UDP socket programming in Java, including code for simple client and server programs that establish a connection and exchange data.
Old Java lectures by my teacher Karim Zebari at Software Department College of Engineering University of Salahaddin-Erbil. The topics are:
- Multithreading
- Security in Java
- Java Beans
- Internationalization
- Java Servlets
- Java Server Pages
- Database access in Java
- More GUI Components & Printing
- Remote Method Invocation (RMI)
- Java Collections Framework
This document describes Machine Problem 1 (MP1) which involves building a peer-to-peer chat application for Android. Students will implement functionality for membership management including peer registration with a server and updating peer lists, as well as private messaging between users. The goals are to learn GUI design, inter-component communication, threading, and socket programming in Android. Guidelines and requirements are provided for the project implementation, documentation, and demonstration.
The document provides an overview of Internet and Java foundations, including:
1) It discusses the evolution of the Internet from early protocols like FTP and Gopher to the development of the World Wide Web.
2) It describes key Internet technologies like HTML, URLs, browsers, and how the client-server model works.
3) It introduces Java as an object-oriented, portable language designed for Internet applications and applets.
The document provides an overview of Internet and Java foundations, including:
1) It discusses the evolution of the Internet from early protocols like FTP and Gopher to the development of the World Wide Web.
2) It describes key Internet technologies like HTML, URLs, browsers, and how the client-server model works.
3) It introduces Java as an object-oriented, portable language designed for Internet applications and applets.
The document provides an overview of Internet and Java foundations, including:
1) It discusses the evolution of the Internet from early protocols like FTP and Gopher to the development of the World Wide Web.
2) It describes the key aspects of Java as a programming language, including its portability across platforms and security features.
3) It outlines Java's advantages as an object-oriented, distributed, high-performance language well-suited for network applications.
The document provides an overview of Internet and Java foundations, including:
- The Internet has evolved from early systems supporting email and file transfer to today's World Wide Web.
- Java was created as a portable, object-oriented programming language to address issues with other languages on the Internet.
- Java allows software to be written once and run on any platform, due to its design of compiling to bytecode that runs on a virtual machine.
The document provides an overview of Internet and Java foundations, including:
1) It discusses the evolution of the Internet from early protocols like FTP and Gopher to the development of the World Wide Web.
2) It describes the key aspects of Java as a programming language, including its portability across platforms and security features.
3) It compares Java to other programming languages like C++ in terms of its object-oriented capabilities and suitability for distributed applications.
The document provides an overview of Internet and Java foundations, including:
1) It discusses the evolution of the Internet from early protocols like FTP and Gopher to the development of the World Wide Web.
2) It describes key Internet technologies like HTML, URLs, browsers, and how the client-server model works.
3) It introduces Java as an object-oriented, portable language designed for Internet applications and applets.
The document provides an overview of Internet and Java foundations, including:
1) It discusses the evolution of the Internet from early protocols like FTP and Gopher to the development of the World Wide Web.
2) It describes the key aspects of Java as a programming language, including its portability across platforms and security features.
3) It outlines Java's advantages as an object-oriented, distributed, high-performance language well-suited for network applications.
The document provides an overview of Internet and Java foundations, including:
1) It discusses the evolution of the Internet from early protocols like FTP and Gopher to the development of the World Wide Web.
2) It describes key Internet technologies like HTML, URLs, browsers, and how the client-server model works.
3) It introduces Java as an object-oriented, portable language designed for Internet applications and applets.
The document provides an overview of Internet and Java foundations, including:
1) It discusses the evolution of the Internet from early protocols like FTP and Gopher to the development of the World Wide Web.
2) It describes key Internet technologies like HTML, URLs, browsers, and how the client-server model works.
3) It introduces Java as an object-oriented, portable language designed for Internet applications and applets.
This document provides an overview of Java and Internet technologies:
- It discusses the evolution of the Internet and technologies like email, FTP, Gopher, and the World Wide Web.
- It introduces Java as an object-oriented, portable, high-performance programming language and describes its core features and advantages over C++.
- It outlines Java development tools and covers key Java concepts like classes, objects, inheritance, interfaces, applets, and security.
Node-RED and Minecraft - CamJam September 2015Boris Adryan
This workshop uses the Node-RED framework as development tool for JavaScript. Building on functionality available for generic programming challenges, we’re going to use the communication standard TCP (Transmission Control Protocol) to interact with the Minecraft API (Application Programming Interface). The material is aimed at people who have had first experience with the Minecraft API on a Raspberry Pi (say, using Python), who now want to understand what's going on behind the scenes and what TCP, API and all those other acronyms mean. It also introduces flow-based programming concepts.
Introduction
This Tutorial is On Socket Programming In C Language for Linux. Instructions Give Below will only work On Linux System not in windows.
Socket API In windows is called Winsock and there we can discuss about that in another tutorial.
What is Socket?
Sockets are a method for communication between a client program and a server program in a network.
A socket is defined as "the endpoint in a connection." Sockets are created and used with a set of programming requests or "function calls" sometimes called the sockets application programming interface (API).
The most common sockets API is the Berkeley UNIX C interface for sockets.
Sockets can also be used for communication between processes within the same computer.
When you start building scripts and apps, you are often faced with almost the same problems. Instead of laboriously constructing loops and queries, we look at the use of modern RegEx in Delphi and Python. Modern refers to 64-bit and Unicode, and pattern matching and stemming are also in demand in AI development or the Human Genome Project. Google, for example, probably uses an analogous process for organic search. Tips and tricks from the PCRE round off the express.
The Google Directions API and Maps (Earth) are two powerful tools that can be used to calculate and visualize directions and routing between locations using various modes of transportation. The Google Maps Platform is also demonstrated with geocoding, I create a Trip Advisor project to then manage services, credentials, calculations, maps, coordinates in APIs and SDKs.
In the last sessions we have seen that P4D (Python 4 Delphi) is powerful enough to offer components, Python packages or libraries in Delphi or Lazarus (FPC). This time we go the other way of usage and integration; how does the Python or web world in the shell benefit from the VCL components as GUI controls. We create a Python extension module from Delphi classes, packages or functions. Building Delphi’s VCL library as a specific Python module in a console or editor and launching a complete Windows GUI from a script can be the start of a long journey.
The flood of Open APIs is now so blatant that we take a closer look at some basics and principles. Of course, the best way to understand how APIs work is to try them. While most APIs require access via API keys or have complicated authentication and authorization methods, there are also open APIs with no requirements or licenses whatsoever. This is especially useful for beginners as we can start exploring different APIs right away. It’s also useful for web developers who want easy access to a sample dataset for their app; e.g. most weather apps get their weather forecast data from a weather API instead of building weather stations themselves.
Faker is a Python library that generates fake data. Fake data is often used for testing or filling databases with some dummy data. Faker is heavily inspired by PHP's Faker, Perl's Data::Faker, and by Ruby's Faker.
Many of the applications and organizations provide avatar features. Finally, synthetic datasets can minimize privacy concerns. Attempts to anonymize data can be ineffective, as even if sensitive/identifying variables are removed from the dataset
Python for Delphi (P4D) is a set of free components that wrap up the Python DLL into Delphi and Lazarus (FPC). They let you easily execute Python scripts, create new Python modules and new Python types. You can create Python extensions as DLLs and much more like scripting. P4D provides different levels of functionality: Low-level access to the python API High-level bi-directional interaction with Python Access to Python objects using Delphi custom variants (VarPyth.pas).
Python for Delphi (P4D) is a set of free components that wrap up the Python DLL into Delphi and Lazarus (FPC). They let you easily execute Python scripts, create new Python modules and new Python types. You can create Python extensions as DLLs and much more like scripting. P4D provides different levels of functionality:
Low-level access to the python API
High-level bi-directional interaction with Python
Access to Python objects using Delphi custom variants (VarPyth.pas)
Wrapping of Delphi objects for use in python scripts using RTTI (WrapDelphi.pas)
Creating python extension modules with Delphi classes and functions
Generate Scripts in maXbox from Python Installation
The document describes steps to build and train an image classification model using Lazarus, the neural-api library, and Google Colab. It clones the neural-api GitHub repository, installs dependencies like FPC and Lazarus, builds and trains a simple image classifier on the CIFAR-10 dataset, and exports the trained model weights and training logs. The process demonstrates how to leverage Google Colab's GPUs to train deep learning models using Lazarus and Pascal.
The portable pixmap format(PPM), the portable graymap format(PGM) and portable bitmap format(PBM) are image file formats designed to be easily exchanged between platforms. They are also sometimes referred collectively as the portable anymap format(PNM). These formats are a convenient (simple) method of saving image data. And the format is not even limited to graphics, its definition allowing it to be used for arbitrary three-dimensional matrices or cubes of unsigned integers.
This tutor puts a trip to the kingdom of object recognition with computer vision knowledge and an image classifier.
Object detection has been witnessing a rapid revolutionary change in some fields of computer vision. Its involvement in the combination of object classification
as well as object recognition makes it one of the most challenging topics in the domain of machine learning & vision.
How can we visualize data in machine learning with VS Code? This is a C# wrapper for the GraphViz graph generator for dotnet core. Further bindings for Python GraphViz are shown and exports to MS Power BI all in MS Visual Code, Jupyter and dotnet core.
K-CAI NEURAL API is a Keras based neural network API for machine learning that will allow you to prototype with a lots of possibilities of Tensorflow! Python, Free Pascal and Delphi together in Google Colab, Git or the Community Edition.
Software is changing the world. CGC is a Common Gateway Coding as the name says, it is a "common" language approach for almost everything. I want to show how a multi-language approach to infrastructure as code using general purpose programming languages lets cloud engineers and code producers unlocking the same software engineering techniques commonly used for applications.
Code Review Checklist: How far is a code review going? "Metrics measure the design of code after it has been written, a Review proofs it and Refactoring improves code."
In this paper a document structure is shown and tips for a code review.
Some checks fits with your existing tools and simply raises a hand when the quality or security of your codebase is impaired.
Open LDAP as A directory serviceis a system for storing and retrieving information in a tree-like structure with the following key properties:
Optimized for reading Distributed storage model Extensible data storage types Advanced search capabilities Consistent replication possibilities
This document discusses closures and functional programming. It begins with an agenda that covers closures as code blocks, their history in languages like Lisp and Scheme, examples of functional programming, and using closures for refactoring. It then discusses a case study on experiences with a polygraph design, including optimizations with closures, packaging, and applying the Demeter principle. Finally, it provides links for further reading on closures.
This document explains how to redirect console output from a GUI application to the parent command prompt process. It describes using the AttachConsole and FreeConsole functions to attach and detach a process from the console. The GetParentProcessName function is used to get the name of the parent process (e.g. cmd.exe or powershell.exe) to determine if output should be redirected. The code sample shows attaching the console, writing sample output, and detaching when complete.
Introduction to use machine learning in python and pascal to do such a thing like train prime numbers when there are algorithms in place to determine prime numbers. See a dataframe, feature extracting and a few plots to re-search for another hot experiment to predict prime numbers.
This tutor shows the train and test set split with binary classifying, clustering and 3D plots and discuss a probability density function in scikit-learn on synthetic datasets. The dataset is very simple as a reference of understanding.
This document discusses machine learning techniques including linear support vector machines (SVMs), data splitting, model fitting and prediction, and histograms. It summarizes an SVM tutorial for predicting samples and evaluating models using classification reports and confusion matrices. It also covers kernel density estimation, PCA, and comparing different classifiers.
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...Infopitaara
A feed water heater is a device used in power plants to preheat water before it enters the boiler. It plays a critical role in improving the overall efficiency of the power generation process, especially in thermal power plants.
🔧 Function of a Feed Water Heater:
It uses steam extracted from the turbine to preheat the feed water.
This reduces the fuel required to convert water into steam in the boiler.
It supports Regenerative Rankine Cycle, increasing plant efficiency.
🔍 Types of Feed Water Heaters:
Open Feed Water Heater (Direct Contact)
Steam and water come into direct contact.
Mixing occurs, and heat is transferred directly.
Common in low-pressure stages.
Closed Feed Water Heater (Surface Type)
Steam and water are separated by tubes.
Heat is transferred through tube walls.
Common in high-pressure systems.
⚙️ Advantages:
Improves thermal efficiency.
Reduces fuel consumption.
Lowers thermal stress on boiler components.
Minimizes corrosion by removing dissolved gases.
Analysis of reinforced concrete deep beam is based on simplified approximate method due to the complexity of the exact analysis. The complexity is due to a number of parameters affecting its response. To evaluate some of this parameters, finite element study of the structural behavior of the reinforced self-compacting concrete deep beam was carried out using Abaqus finite element modeling tool. The model was validated against experimental data from the literature. The parametric effects of varied concrete compressive strength, vertical web reinforcement ratio and horizontal web reinforcement ratio on the beam were tested on eight (8) different specimens under four points loads. The results of the validation work showed good agreement with the experimental studies. The parametric study revealed that the concrete compressive strength most significantly influenced the specimens’ response with the average of 41.1% and 49 % increment in the diagonal cracking and ultimate load respectively due to doubling of concrete compressive strength. Although the increase in horizontal web reinforcement ratio from 0.31 % to 0.63 % lead to average of 6.24 % increment on the diagonal cracking load, it does not influence the ultimate strength and the load-deflection response of the beams. Similar variation in vertical web reinforcement ratio leads to an average of 2.4 % and 15 % increment in cracking and ultimate load respectively with no appreciable effect on the load-deflection response.
Sorting Order and Stability in Sorting.
Concept of Internal and External Sorting.
Bubble Sort,
Insertion Sort,
Selection Sort,
Quick Sort and
Merge Sort,
Radix Sort, and
Shell Sort,
External Sorting, Time complexity analysis of Sorting Algorithms.
The role of the lexical analyzer
Specification of tokens
Finite state machines
From a regular expressions to an NFA
Convert NFA to DFA
Transforming grammars and regular expressions
Transforming automata to grammars
Language for specifying lexical analyzers
its all about Artificial Intelligence(Ai) and Machine Learning and not on advanced level you can study before the exam or can check for some information on Ai for project
Fluid mechanics is the branch of physics concerned with the mechanics of fluids (liquids, gases, and plasmas) and the forces on them. Originally applied to water (hydromechanics), it found applications in a wide range of disciplines, including mechanical, aerospace, civil, chemical, and biomedical engineering, as well as geophysics, oceanography, meteorology, astrophysics, and biology.
It can be divided into fluid statics, the study of various fluids at rest, and fluid dynamics.
Fluid statics, also known as hydrostatics, is the study of fluids at rest, specifically when there's no relative motion between fluid particles. It focuses on the conditions under which fluids are in stable equilibrium and doesn't involve fluid motion.
Fluid kinematics is the branch of fluid mechanics that focuses on describing and analyzing the motion of fluids, such as liquids and gases, without considering the forces that cause the motion. It deals with the geometrical and temporal aspects of fluid flow, including velocity and acceleration. Fluid dynamics, on the other hand, considers the forces acting on the fluid.
Fluid dynamics is the study of the effect of forces on fluid motion. It is a branch of continuum mechanics, a subject which models matter without using the information that it is made out of atoms; that is, it models matter from a macroscopic viewpoint rather than from microscopic.
Fluid mechanics, especially fluid dynamics, is an active field of research, typically mathematically complex. Many problems are partly or wholly unsolved and are best addressed by numerical methods, typically using computers. A modern discipline, called computational fluid dynamics (CFD), is devoted to this approach. Particle image velocimetry, an experimental method for visualizing and analyzing fluid flow, also takes advantage of the highly visual nature of fluid flow.
Fundamentally, every fluid mechanical system is assumed to obey the basic laws :
Conservation of mass
Conservation of energy
Conservation of momentum
The continuum assumption
For example, the assumption that mass is conserved means that for any fixed control volume (for example, a spherical volume)—enclosed by a control surface—the rate of change of the mass contained in that volume is equal to the rate at which mass is passing through the surface from outside to inside, minus the rate at which mass is passing from inside to outside. This can be expressed as an equation in integral form over the control volume.
The continuum assumption is an idealization of continuum mechanics under which fluids can be treated as continuous, even though, on a microscopic scale, they are composed of molecules. Under the continuum assumption, macroscopic (observed/measurable) properties such as density, pressure, temperature, and bulk velocity are taken to be well-defined at "infinitesimal" volume elements—small in comparison to the characteristic length scale of the system, but large in comparison to molecular length scale
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYijscai
With the increased use of Artificial Intelligence (AI) in malware analysis there is also an increased need to
understand the decisions models make when identifying malicious artifacts. Explainable AI (XAI) becomes
the answer to interpreting the decision-making process that AI malware analysis models use to determine
malicious benign samples to gain trust that in a production environment, the system is able to catch
malware. With any cyber innovation brings a new set of challenges and literature soon came out about XAI
as a new attack vector. Adversarial XAI (AdvXAI) is a relatively new concept but with AI applications in
many sectors, it is crucial to quickly respond to the attack surface that it creates. This paper seeks to
conceptualize a theoretical framework focused on addressing AdvXAI in malware analysis in an effort to
balance explainability with security. Following this framework, designing a machine with an AI malware
detection and analysis model will ensure that it can effectively analyze malware, explain how it came to its
decision, and be built securely to avoid adversarial attacks and manipulations. The framework focuses on
choosing malware datasets to train the model, choosing the AI model, choosing an XAI technique,
implementing AdvXAI defensive measures, and continually evaluating the model. This framework will
significantly contribute to automated malware detection and XAI efforts allowing for secure systems that
are resilient to adversarial attacks.
Raish Khanji GTU 8th sem Internship Report.pdfRaishKhanji
This report details the practical experiences gained during an internship at Indo German Tool
Room, Ahmedabad. The internship provided hands-on training in various manufacturing technologies, encompassing both conventional and advanced techniques. Significant emphasis was placed on machining processes, including operation and fundamental
understanding of lathe and milling machines. Furthermore, the internship incorporated
modern welding technology, notably through the application of an Augmented Reality (AR)
simulator, offering a safe and effective environment for skill development. Exposure to
industrial automation was achieved through practical exercises in Programmable Logic Controllers (PLCs) using Siemens TIA software and direct operation of industrial robots
utilizing teach pendants. The principles and practical aspects of Computer Numerical Control
(CNC) technology were also explored. Complementing these manufacturing processes, the
internship included extensive application of SolidWorks software for design and modeling tasks. This comprehensive practical training has provided a foundational understanding of
key aspects of modern manufacturing and design, enhancing the technical proficiency and readiness for future engineering endeavors.
1. maXbox Starter 18
Start with Arduino Programming V3.5
1.1 Physical Computing with RGB LED
Today we enter a topic in programming called embedded computing with the internet;
we code a RGB LED light on a Arduino board with a breadboard on which we switch
off or on the light by a browser on an android device with our own web server and
their COM protocols too. Hope you did already work with the Starter 1 till 17
(especially the 17) at:
http://sourceforge.net/apps/mediawiki/maxbox/
Arduino hardware is programmed using a Wiring-based language (syntax and
libraries), similar to C++ and Object Pascal with some simplifications and
modifications, and a Processing-based integrated development environment like
Delphi or Lazarus with Free Pascal.
Current versions can be purchased pre-assembled; hardware design information is
available for those who would like to assemble an Arduino by hand. Additionally,
variations of the Italian-made Arduino—with varying levels of compatibility—have
been released by third parties; some of them are programmed using the Arduino
software or the sketch firmware.
The Arduino is what is known as a Physical or Embedded Computing platform, which
means that it is an interactive system that through the use of hardware, firmware and
software can interact with its environment.
This lesson will introduce you to Arduino and the Serial communication (see Tutorial
15). We will now dive into the world of serial communications and control our lamp
from a browser to a web server by sending commands from the PC to the Arduino
using a serial monitor with interface.
2. In our case we explain one example of a HTTP server which is an intermediate to the
COM serial communication with the AVR based micro controller on Arduino1
.
Another Controller is the Delphi Controller. A Delphi Controller and the
DelphiDevBoard were designed to help students, Pascal programmers and
electronic engineers understand how to program micro controllers and embedded
systems especially in programming these devices and targets (see links at the end).
This is achieved by providing hardware (either pre-assembled or as a DIY kit of
components), using course material, templates, and a Pascal compatible cross-
compiler and using of a standard IDE for development and debugging (Delphi,
maXbox, Lazarus or Free Pascal).
Let’s begin with HTTP (Hypertext Transfer Protocol) and TCP. TCP/IP stands for
Transmission Control Protocol and Internet Protocol. TCP/IP can mean many things,
but in most cases, it refers to the network protocol itself.
Each computer on a TCP/IP network has a unique address associated with it, the so
called IP-Address. Some computers may have more than one address associated
with them. An IP address is a 32-bit number and is usually represented in a dot
notation, e.g. 192.168.0.1. Each section represents one byte of the 32-bit address. In
maXbox a connection with HTTP represents an object.
In our case we will operate with the local host. It is common for computers to refer to
themselves with the name local host and the IP number 127.0.0.1.
1.2 Get the Code
As you already know the tool is split up into the toolbar across the top, the editor or
code part in the centre and the output window at the bottom. Change that in the
menu /view at our own style.
In maXbox you will start the web server as a script, so the web server IS the script
that starts the Indy objects, configuration and a browser too (on board:
Options/Add_ons/Easy_Browser/.
Before this starter code will work you will need to download maXbox from the
website. It can be down-loaded from http://www.softwareschule.ch/maxbox.htm
(you’ll find the download maxbox3.zip on the top left of the page). Once the download
has finished, unzip the file, making sure that you preserve the folder structure as it is.
1
An Arduino board consists of an 8-bit Atmel AVR microcontroller, or an ARM cortex on the Due
2
3. If you double-click maxbox3.exe the box opens a default demo program. Test it with
F9 / F2 or press Compile and you can open now the script example:
443_webserver_arduino_rgb_light5.txt
If you want to get the whole package including Arduino sketches too then try the zip-
file:
http://sourceforge.net/projects/maxbox/files/Arduino/arduinopackage.zip/download
only sources:
http://www.softwareschule.ch/download/ardpac.zip
Now let’s take a look at the code of this project. Our first line is
01 program Motion_HTTPServer_Arduino42_RGB_LED_Light;
This example requires two objects from the classes: TIdCustomHTTPServer and
TComPort so the second one is to connect and transport with the COM ports to
Arduino (see below). TComPort by Dejan Crnila2
are Delphi/C++ Builder serial
communications components. It is generally easy to use for basic serial
communications purposes, alternative to the TurboPower ASYNCPro.
It includes 5 components: TComPort, TComDataPacket, TComComboBox, TComRadioGroup
and TComLed. With these tools you can build serial communication apps easier and
faster than ever.
First we start with the web server and second we explain the COM port.
After creating the object we use first methods to configure our server calling Port and
IP. The object makes a bind connection with the Active method by passing a web
server configuration.
123 HTTPServer:= TIdCustomHTTPServer.Create(self);
So the object HTTPServer has some methods and properties like Active you can find
in the TIdCustomHTTPServer.pas unit or IdHTTPServer library. A library is a collection
of code or classes, which you can include in your program. Once a unit is tested it’s
stable to use.
But where does this function come from?
They use the windows 32-bit application programming interface, which basically
means interacting with Win operating systems and libraries such as Win XP or 7 or 8
and the concerning DLL.
So most of the calls are valuable from a DLL:
function MyNETConnect(hw: hwnd; dw: dword): Longint;
external '[email protected] stdcall';
2
http://sourceforge.net/projects/comport/
3
4. 1: The GUI of the Win App
Indy is designed to provide a very high level of abstraction. Much more stuff or
intricacies and details of the TCP/IP stack are hidden from the Indy programmer. A
typical Indy client session looks like this:
with IndyClient do begin
Host:= 'zip.pbe3.com'; // Host to call
Port:= 6000; // Port to call the server on
Connect; // get something to do with it
end;
Indy is different than other so called winsock components you may be familiar with. If
you've worked with other components, the best approach for you may be to forget
how they work. Nearly all other components use non-blocking (asynchronous) calls
and act asynchronously. They require you to respond to events, set up state
machines, and often perform wait loops.
In facts there are 2 programming models used in TCP/IP applications. Non
Blocking means that the application will not be blocked when the application socket
read/write data. This is efficient, because your application don't have to wait for a
connection. Unfortunately, it is complicated to develop.
Like a web socket. According to the draft specification, the Web Socket protocol
enables two-way communication between a user agent running untrusted code
running in a controlled environment layered over TCP to a remote host that has
opted-in to communications from that code.
4
5. The goal of this technology is to provide a mechanism for browser-based applications
that need two-way communication with servers that does not rely on opening multiple
HTTP connections (e.g. using XMLHttpRequest or iframes and long polling).
Translated into human language, using Web Sockets, the (web)server can now
initiate communication and send data to the client (browser) without being asked in a
HTTP. This happens after a trusty channel of communication is established over a
TCP connection.
2: The Use Case
So let’s get back to our HTTP Create in line 123. In line 131 and 132 you see port
and IP address configuration of a Const, instead of IP you can also set a host name
as a parameter.
126 with HTTPServer do begin
127 if Active then Free;
128 if not Active then begin
129 Bindings.Clear;
130 bindings.Add;
131 bindings.items[0].Port:= APORT;
132 bindings.items[0].IP:= IPADDR; //'127.0.0.1'; 192.168.1.53'
133 Active:= true;
134 onCommandGet:= @HTTPServerGet;
135 PrintF('Listening HTTP on %s:%d.',[Bindings[0].IP,Bindings[0].Port]);
136 end;
Host names are "human-readable" names for IP addresses. An example host
name is max.kleiner.com, the www is just a convention and not necessary. Every
host name has an equivalent IP address, e.g. www.hower.org = 207.65.96.71.
5
6. 3: A few gadgets for Arduino
The full target of the request message is given by the URL property. Usually, this is a
URL that can be broken down into the protocol (HTTP), Host (server system), script
name (server application), path info (location on the host), and a query.
So far we have learned little about HTTP and host names. Now it’s time to
run our program at first with F9 (if you haven’t done yet) and learn
something about GET and HTML. The program (server) generates a
standard HTML output or other formats (depending on the MIME type) after
downloading with GET or HEAD.
So our command to shine on a LED is ../LED and to switch off is ../DEL
(127.0.0.1:8000/LED).
Those are GET commands send with the browser, or /R for Red or /G for Green.
The first line identifies the request as a GET. A GET request message asks the Web
server application to return the content associated with the URI that follows the word
GET.
The following shows the magic behind in the method HTTPServerGet():
43 procedure HTTPServerGet(aThr: TIdPeerThread; reqInf: TIdHTTPRequestInfo;
44 respInf: TIdHTTPResponseInfo);
One word concerning the thread: In the internal architecture there are 2 threads
categories.
First is a listener thread that “listens” and waits for a connection. So we don't have to
worry about threads, the built in thread TIdPeerThread will be served by Indy through
a parameter:
6
7. 54 if uppercase(localcom) = uppercase('/LED') then begin
55 cPort.WriteStr('1')
56 writeln(localcom+ ': LED on');
57 RespInfo.ContentText:= getHTMLContentString('LED is: ON');
58 end else
59 if uppercase(localcom) = uppercase('/DEL') then begin
60 cPort.WriteStr('A');
61 writeln(localcom+ ': LED off');
62 RespInfo.ContentText:= getHTMLContentString('LED is: OFF')
63 end;
HTTP request messages contain many headers that describe information about the
client, the target of the request, the way the request should be handled, and any
content sent with the request. Each header is identified by a name, such as "Host"
followed by a string value. It then does a request.
You can also switch with F5 in a browser to switch LED on and off:
69 webswitch:= NOT webswitch;
70 if webswitch then begin
71 cPort.WriteStr('1') //goes to Arduino
72 RespInfo.ContentText:= getHTMLContentString('LED is: ON Switch');
73 end else begin
74 cPort.WriteStr('A');
75 RespInfo.ContentText:= getHTMLContentString('LED is: OFF Switch')
76 end
77 end
One of a practical way to learn much more about actually writing HTML is to get in
maXbox editor and load or open a web-file with the extension html. Or you copy the
output and paste it in a new maXbox instance. Then you click on the context menu
and change to HTML Syntax!
In this mode the PC is a master and executes the control algorithm while the Arduino
or Delphi Controller acts as an interface slave and follows commands coming from
the PC or browser through its RS232 port. Each RGB field in these records reflects a
state of the sensors and actuators of the LED in those sense only actors as LED light
are in use.
On menu /View/VTerminal you do have a terminal monitor to test your script.
A running Arduino (M485A) monitor server will accept commands on input through a
RS232 port:
if (val=='1'){
digitalWrite(ledPin11,HIGH); }
else if (val=='A'){
digitalWrite(ledPin11,LOW);
}
if (val=='2'){
digitalWrite(ledPin12,HIGH); }
else if (val=='B'){
digitalWrite(ledPin12,LOW);
}
7
8. 4: The Browser controls
When the browser starts from script the server is ready for commands to pass chars
to the serial communication. When a the server application finishes with our client
request, it lights the LED and constructs a page of HTML code or other MIME
content, and passes the result back (via the server in TIdHTTPResponseInfo ) to the
client for display.
61 writeln(localcom+ ': LED on');
62 RespInfo.ContentText:= getHTMLContentString('LED is: ON');
Have you tried the program, it’s also possible to test the server without Arduino or a
browser. When you run this code from the script 102_pas_http_download.txt you
will see a content (first 10 lines) of the site in HTML format with the help of the
method memo2.lines.add:
begin
idHTTP:= TIdHTTP.Create(NIL)
try
memo2.lines.text:= idHTTP.Get2('http://127.0.0.1')
for i:= 1 to 10 do
memo2.lines.add(IntToStr(i)+' :'+memo2.lines[i])
finally
idHTTP.Free
end
The Object TIdHTTP is a dynamically allocated block of memory whose structure is
determined by its class type. With the method Get1 you can download files.
11 begin
12 myURL:= 'http://www.softwareschule.ch/download/maxbox_examples.zip';
13 zipStream:= TFileStream.Create('myexamples2.zip', fmCreate)
14 idHTTP:= TIdHTTP.Create(NIL)
15 try
16 idHTTP.Get1(myURL, zipStream)
Of course a lot of lines to get a file from the web - try it shorter with the short magic
function wGet():
8
9. wGet('http://www.softwareschule.ch/download/maxbox_starter17.pdf','mytestpdf.pdf');
It downloads the entire file into memory if the data is compressed (Indy 9 does not
support streaming decompression for HTTP yet). Next we come closer to the main
event of our web server in line 40, it’s the event onCommandGet with the corresponding
event handler method @HTTPServerGet() and one object of TidPeerThread.
You can use them as server as the way to serve files of many kinds!
5: maXuino Together Settings
1.3 Serial Line
Please read more about serial coding in Tutor 15! The serial communications line is
simply a way for the Arduino to communicate with the outside world, in this case to
and from the PC (via USB) and the Arduino IDE’s Serial Monitor or from the
uploaded code to I/O Board back.
Virtual COM port (VCP) drivers cause the USB device to appear as an additional
COM port available to the PC. Application software can access the USB device in the
same way as it would access a standard COM port.
We just create and configure our COM settings (depends in which COM port a USB
hub works).
procedure TForm1_FormCreateCom(Sender: TObject);
begin
cPort:= TComPort.Create(self);
with cPort do begin
BaudRate:= br9600;
Port:= COMPORT; //'COM3';
Parity.Bits:= prNone;
StopBits:= sbOneStopBit;
DataBits:= dbEight;
end;
9
10. The Arduino can be used to develop stand-alone interactive objects or it can be
connected to a computer to retrieve or send data to the Arduino and then act on that
data (e.g. send sensor data out to the web or write data on a control LED).
Now we change to the Arduino editor to explain how he handles our commands
(chars).
Serial.begin tells Arduino to start serial and the number within the parenthesis, in
this case 9600, sets the baud rate (chars per second) that the serial line will
communicate at.
int val = 0; // variable to store data from the serial port
int ledPin11 = 11; // LED connected to digital pin 11 or the inbuilt 13!
void setup() {
pinMode(ledPin11,OUTPUT); // declare a LED's pin as output mode
erial.begin(9600); // connect to serial port
..}
In the main loop we have an “if statement”. The condition it is checking the value in
(Serial.read). The Serial.available command checks to see if any characters have
been sent down the serial line. If any characters have been received then the
condition is met and the code within the “if statements” code block is now executed,
you see if ‘1’ then ON and if ‘A’ then OFF.
The condition of checking is simply a char it’s up to you to code a protocol of your
own.
void loop () {
val = Serial.read(); // read on the serial port
if (val !=-1){
if (val=='1'){
digitalWrite(ledPin1,HIGH);
}
else if (val=='A'){
digitalWrite(ledPin1,LOW);
}
Serial.print("Data entered: "); and this is our way of sending data back from the
Arduino to the PC. In this case the print command sends whatever is within the
parenthesis to the PC, via the USB cable, where we can read it in the monitor
window or in maXbox.
1.4 Bread Board Flow
At last but not least some words about breadboards and electronics. A breadboard
(or protoboard) is usually a construction base for prototyping devices of electronics.
The term "breadboard" is commonly used to refer to a solder less breadboard (plug
board).
Next time you may print out the breadboard on a 3D printer ;-).
With the breadboard you prepared above or below, add three wires for power to RGB
light and one for ground GND for your AVR controller.
Place 3 resistors and LED as shown. Make sure the longest leg of the LED is to
GND, connected to the minus. The resistors don’t have a direction, so it doesn’t
matter which way it goes in.
10
11. 6: Breadboard Settings
If you're using a standard breadboard, you'll need to use wires to reach the Arduino.
Run 3 wires (red, green and blue) to the pin sockets on the Arduino. Run the other
wire (black) to one of the GND sockets on the Arduino. The colours aren't essential
but they will help you remember what the wires are connected to and black is a
convention for ground GND!
Once the connection to a client socket is completed, the server connection is
indistinguishable from a client connection. Both end points have the same
capabilities and receive the same types of events. Only the listening connector is
fundamentally different, as it has only a single endpoint.
7: PWM Signal measure in Oscilloscope
Sockets provide an interface between your network server or client application and a
11
12. networking software. You must provide an interface between your application and
clients that use it.
Sockets let your network application communicate with other systems over the
network. Each socket can be viewed as an endpoint in a network connection. It has
an address that specifies:
• The system on which it is running.
• The types of interfaces it understands.
• The port it is using for the connection.
A full description of a socket connection includes the addresses of the sockets on
both ends of the connection. You can describe the address of each socket endpoint
by supplying both the IP address or host and the port number.
In the next line we just start a browser to test our server in a so called frame work
flow
34 procedure letOpenBrowser;
35 // TS_ShellExecuteCmd = (seCmdOpen,seCmdPrint,seCmdExplore);
36 begin
37 //ShellAPI.ShellExecute(Handle,PChar('open'),'http://127.0.0.1:80/',Nil,Nil,0);
38 S_ShellExecute('http:'+IPADDR+':'+IntToStr(APORT)+'/','',seCmdOpen)
39 end;
Try to change the IP address in line 132 of IP:= IPADDR with a DHCP or
dynDNS address, so you can reach Arduino from an Android, but change also
settings.
Some notes at last about firewalls or proxy-servers. It depends on your network
infrastructure to get a file or not, maybe you can’t download content cause of security
reasons and it stops with Socket-Error # 10060 and a time out error.
Furthermore, it also depends on the firewall in use at both ends. If it's automatic and
recognises data that needs a response automatically it will work. It needs an
administrator to open ports etc. you’re stuffed or configured.
Hope you did learn in this tutorial the theme of Arduino with a web server.
The Arduino is an amazing device and will enable you to make anything from
interactive works of art to robots. With a little enthusiasm to learn how to program the
12
13. Arduino and make it interact with other components a well as a bit of imagination,
you can build anything you want.
The Arduino can also be extended with the use of Shields which circuit boards are
containing other devices (e.g. GPS receivers, LED Cubes, LCD Displays, Sneakers,
MIDI Synthesizers, Ethernet connections, etc.) that you can simply slot into the top of
your Arduino to get extra functionality.
The Arduino board is made of an Atmel AVR microprocessor, a crystal or oscillator
(basically a crude clock that sends time pulses to the micro-controller to enable it to
operate at the correct what type of Arduino you have, you may also have a USB
connector to enable it to be connected to a PC or Linux to upload or retrieve data.
The board exposes the micro-controllers I/O (Input/Output) pins to enable you to
connect those pins to other circuits, buses or to sensors, etc.
Feedback @
[email protected]
Literature: Kleiner et al., Patterns konkret, 2003, Software & Support
Links of maXbox, Web of Things, Arduino and Indy:
http://www.softwareschule.ch/download/webofthings2013.pdf
http://www.softwareschule.ch/download/codesign_2015.pdf
http://www.softwareschule.ch/maxbox.htm
http://www.indyproject.org/Sockets/index.EN.aspx
http://en.wikipedia.org/wiki/Arduino
http://fritzing.org/
http://sourceforge.net/projects/maxbox
http://sourceforge.net/projects/delphiwebstart
http://www.blaisepascal.eu/index.php?actie=./subscribers/UK_Electronics_Department
http://www.blaisepascal.eu/subscribers/vogelaar_elctronics_info_english.php
13