SlideShare a Scribd company logo
1 of 18
Download to read offline
Arduino and C# Things
Yes, we scan…
http://en.wikipedia.org/wiki/Web_of_Things
Max Kleiner
Be aware of
(Web of No Things)
2
• You deal with physics and elements (xyz)
• Lots of sensors & actuators to solder
• Memory on microcontroller is very small
• Which Casing…, ex. 336_digiclock_3.txt
• Keep it simple: not (A v B) = not A ^ not B
A= A+B, B=A-B, A=A-B
• Push a Session or pull a Service ?
• Call it Host to Device Ident (master-slave)
• Which Use Case ex. App or DigiCam?
http://en.wikipedia.org/wiki/Anti-pattern
A Short History of Time
1991 Application Program
1995 Application
1998 Applet
2010 App
2015 A (Android, Arduino, ARM)
How to Start ?
• With a Starter Kit you have everything you need to start learning the basics of electronics: an
Arduino UNO, an essential set for wiring things up, a lot of sensors and actuators.
3
Ex. Blink (out of the Box)
List of Things
4
• 1 Arduino UNO R3
• 1 Arduino Editor V 1.0.5
• 1 Steckbrett (solderless breadboard)
• 1 multiplexed 4-Digit-7-Segment LED Display LN3461AS2B, common cathode, 12
Pins (Bezugsquelle Datenblatt)
• 4 Widerstände 680 Ohm (resistor)
• 12 Jumperkabel M/M (hookup-wires)
• 4 Jumperkabel M/F (jumper-wires)
• Stiftleiste 7 Pin einfach (pin strip or socket board)
• ein paar Drahtverbindungen, damit das Display im Kabelsalat nicht total verschwindet
• RTC-Modul DS1307, konkret ein DS1307 und AT 24C32 Combo Breakout
http://en.wikipedia.org/wiki/RFID
ex. SimLogicBox - Chess Roboter Topic – First Web of Things
Programming Things
RTC and COM time consuming process
• namespace ch.maxbox.arduino.time {
• class ArduinoTimeSetter {
• static void Main(string[] args) {
• Settings settings = new Settings();
• SerialPort port = new SerialPort(settings.port,9600);
• DateTime now = DateTime.Now;
• port.Open();
• //time formatting, be aware new format (incl weekdays) for DS1307
• String arduinoTime = String.Format("{0:HHmmssddMMyy}",DateTime.Now)+((int)
• DateTime.Now.DayOfWeek);
• Console.WriteLine(arduinoTime);
• //pass the time to COM
• port.Write(arduinoTime);
• while (true) {
• Console.WriteLine("From Arduino “+ port.ReadLine());
• }
• }
• }
• }
5
Proof of Concept Lord of the Things
6
Decison Process
• Before starting, the following questions should be answered:
• What is the scope of the application?
• • Monitoring measurements and devices?
• • Mobile Gadget?
• What is the scenario Use Case?
• • A thing with embedded web service?
• • A set of things connected through a gateway or bus?
• What programming language or IDE?
• • Options: C, Pascal, Java, C#, Processing, ADT, AVR Studio, POSIX Cygwin
core API, Atmel Programmer
• What is the runtime, publishing infrastructure?
• • None, custom ASIC, third party (AVR, ARM, Udoo, PIC, PI…).
• • Hardware casing, box or integration.
7
Function Memory Thinking
• function StartLoadSrvc(afname: string): TStringList;
• begin
• if fileExists(ExePath+'examples/'+afname) then begin
• result:= TStringList.create;
• result.loadfromFile(ExePath+'examples/'+afname);
• end
• end;
• mycipher:= encrypDecryp(StartLoadSrvc(fname).text,MYKEY,'E')
Object Passing: writeln(getFileList(TStringList.create,
'D:kleiner2014EA_docus*.*').strings[i]);
8
036_pas_includetest_basta.txt / 383_MDAC_DCOM.txt
Arduino UNO Memory
Flash 32,768 bytes non-volatile Stores the program source code and Arduino bootloader
SRAM 2048 bytes volatile Operating space for accessing variables and functions
EEPROM 1024 bytes non-volatile Permanent storage for user data like readings or settings
Use Q Rules
• CA1303: Do not pass literals as localized
parameters
• public void TimeMethod(int hour, int minute)
{ if (hour < 0 || hour > 23) { MessageBox.Show( "The valid range is 0 -
23."); //CA1303 fires because the parameter for method Show is Text }
• CA1302: Do not hardcode locale specific
strings
• static void Main()
{ string string0 = "C:";
• Sonar/PMD: Avoid duplicate literals (hard coded
string or numeric)
9
Case Study
• Arduino Uno Board with RGB LED COM Box
10
LED Box Solution
11
Use Case Shine on you crazy…
12
Send a command over http to com on board to light a rgb led
Solution Arduino C
13
Tutor: http://www.softwareschule.ch/download/maxbox_starter18_3.pdf
void setup() {
// initialize digital pin as an output.
pinMode(ledPin11, OUTPUT);
Serial.begin(9600);
void loop () {
val = Serial.read(); //read serial port
if (val !=-1){
if (val=='1'){
digitalWrite(ledPin1,HIGH);
}
else if (val=='A'){
digitalWrite(ledPin1,LOW);
}
Standard Arduino Library
Solution HTTP Server
14
http://www.softwareschule.ch/examples/443_webserver_arduino_rgb_light.txt
76 with HTTPServer do begin
77 if Active then Free;
78 if not Active then begin
79 bindings.Clear;
80 bindings.Add;
81 bindings.items[0].Port:= APORT;
82 bindings.items[0].IP:= IPADDR; //'127.0.0.1'; {GetHostIP}
83 Active:= true;
84 onCommandGet:= @HTTPServerGet;
85 PrintF('Listening HTTP on %s:%d.', [Bindings[0].IP,Bindings[0].Port]);
86 end;
Solution COM Port
15
361_heartbeat_wave.txt
http://en.wikipedia.org/wiki/Household_appliances
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;
procedure HTTPServerGet(aThr: TIdPeerThread; reqInfo:
TIdHTTPRequestInfo; respInfo: TIdHTTPResponseInfo);
Test the Light
http://192.168.1.40:8080/R
16
Ein Spermium enthält 37,5 MB DNA-Daten. Eine Ejakulation entspricht einem
Datentransfer von 1500 TB in 3 Sek. Und ihr denkt DSL sei schnell... ;).
Thanks! Links to Rights
the source is the code
17
http://www.softwareschule.ch/maxbox.htm
http://sourceforge.net/projects/maxbox
http://sourceforge.net/apps/mediawiki/maxbox/
http://en.wikipedia.org/wiki/Arduino
http://www.softwareschule.ch/download/webofthings2013.pdf
Book Patterns konkret
http://www.amazon.de/Patterns-konkret-Max-Kleiner/dp/3935042469
RTClock, Arduino and C# by Silvia Rothen
http://ecotronics.ch.honorius.sui-inter.net/wordpress/2013/arduino-
als-uhr-version-2-mit-rtc-komponente-und-led-display/
http://www.ecotronics.ch/ecotron/arduinocheatsheet.htm
http://carolinafortuna.com/web-of-things-tutorial/
Code a World
hack the earth
18
Yes, we hack…

More Related Content

What's hot

Virtual platform
Virtual platformVirtual platform
Virtual platform
sean chen
 
Verilator: Fast, Free, But for Me?
Verilator: Fast, Free, But for Me? Verilator: Fast, Free, But for Me?
Verilator: Fast, Free, But for Me?
DVClub
 
Processor Verification Using Open Source Tools and the GCC Regression Test Suite
Processor Verification Using Open Source Tools and the GCC Regression Test SuiteProcessor Verification Using Open Source Tools and the GCC Regression Test Suite
Processor Verification Using Open Source Tools and the GCC Regression Test Suite
DVClub
 
Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/Invoke
Dmitri Nesteruk
 
Twisted logic
Twisted logicTwisted logic
Twisted logic
ashfall
 
Juan josefumeroarray14
Juan josefumeroarray14Juan josefumeroarray14
Juan josefumeroarray14
Juan Fumero
 

What's hot (20)

C++ How I learned to stop worrying and love metaprogramming
C++ How I learned to stop worrying and love metaprogrammingC++ How I learned to stop worrying and love metaprogramming
C++ How I learned to stop worrying and love metaprogramming
 
Virtual platform
Virtual platformVirtual platform
Virtual platform
 
Verilator: Fast, Free, But for Me?
Verilator: Fast, Free, But for Me? Verilator: Fast, Free, But for Me?
Verilator: Fast, Free, But for Me?
 
Конверсия управляемых языков в неуправляемые
Конверсия управляемых языков в неуправляемыеКонверсия управляемых языков в неуправляемые
Конверсия управляемых языков в неуправляемые
 
An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...
An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...
An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...
 
Processor Verification Using Open Source Tools and the GCC Regression Test Suite
Processor Verification Using Open Source Tools and the GCC Regression Test SuiteProcessor Verification Using Open Source Tools and the GCC Regression Test Suite
Processor Verification Using Open Source Tools and the GCC Regression Test Suite
 
Async await in C++
Async await in C++Async await in C++
Async await in C++
 
Java vs. C/C++
Java vs. C/C++Java vs. C/C++
Java vs. C/C++
 
A look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
A look into the sanitizer family (ASAN & UBSAN) by Akul PillaiA look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
A look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
 
Exploring the Cryptol Toolset
Exploring the Cryptol ToolsetExploring the Cryptol Toolset
Exploring the Cryptol Toolset
 
JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?
 
Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/Invoke
 
C# for C++ Programmers
C# for C++ ProgrammersC# for C++ Programmers
C# for C++ Programmers
 
C++20 the small things - Timur Doumler
C++20 the small things - Timur DoumlerC++20 the small things - Timur Doumler
C++20 the small things - Timur Doumler
 
Twisted logic
Twisted logicTwisted logic
Twisted logic
 
WAD : A Module for Converting Fatal Extension Errors into Python Exceptions
WAD : A Module for Converting Fatal Extension Errors into Python ExceptionsWAD : A Module for Converting Fatal Extension Errors into Python Exceptions
WAD : A Module for Converting Fatal Extension Errors into Python Exceptions
 
Handling inline assembly in Clang and LLVM
Handling inline assembly in Clang and LLVMHandling inline assembly in Clang and LLVM
Handling inline assembly in Clang and LLVM
 
PyCon TW 2017 - PyPy's approach to construct domain-specific language runtime...
PyCon TW 2017 - PyPy's approach to construct domain-specific language runtime...PyCon TW 2017 - PyPy's approach to construct domain-specific language runtime...
PyCon TW 2017 - PyPy's approach to construct domain-specific language runtime...
 
Threads and Callbacks for Embedded Python
Threads and Callbacks for Embedded PythonThreads and Callbacks for Embedded Python
Threads and Callbacks for Embedded Python
 
Juan josefumeroarray14
Juan josefumeroarray14Juan josefumeroarray14
Juan josefumeroarray14
 

Similar to Arduino C maXbox web of things slide show

Intro to Arduino Programming.pdf
Intro to Arduino Programming.pdfIntro to Arduino Programming.pdf
Intro to Arduino Programming.pdf
HimanshuDon1
 
ควบคุมบอร์ดArduinoผ่านระบบandroid
ควบคุมบอร์ดArduinoผ่านระบบandroidควบคุมบอร์ดArduinoผ่านระบบandroid
ควบคุมบอร์ดArduinoผ่านระบบandroid
Worakrit Sittirit
 
20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris
imec.archive
 
teststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptxteststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptx
ethannguyen1618
 

Similar to Arduino C maXbox web of things slide show (20)

Arduino delphi 2014_7_bonn
Arduino delphi 2014_7_bonnArduino delphi 2014_7_bonn
Arduino delphi 2014_7_bonn
 
arduinoedit.pptx
arduinoedit.pptxarduinoedit.pptx
arduinoedit.pptx
 
Arduino Programming Familiarization
Arduino Programming FamiliarizationArduino Programming Familiarization
Arduino Programming Familiarization
 
Arduino by yogesh t s'
Arduino by yogesh t s'Arduino by yogesh t s'
Arduino by yogesh t s'
 
Arduino
ArduinoArduino
Arduino
 
Intro to Arduino Programming.pdf
Intro to Arduino Programming.pdfIntro to Arduino Programming.pdf
Intro to Arduino Programming.pdf
 
IOT beginnners
IOT beginnnersIOT beginnners
IOT beginnners
 
IOT beginnners
IOT beginnnersIOT beginnners
IOT beginnners
 
Starting with Arduino
Starting with Arduino Starting with Arduino
Starting with Arduino
 
ควบคุมบอร์ดArduinoผ่านระบบandroid
ควบคุมบอร์ดArduinoผ่านระบบandroidควบคุมบอร์ดArduinoผ่านระบบandroid
ควบคุมบอร์ดArduinoผ่านระบบandroid
 
Introduction to Arduino Microcontroller
Introduction to Arduino MicrocontrollerIntroduction to Arduino Microcontroller
Introduction to Arduino Microcontroller
 
Multi Sensory Communication 2/2
Multi Sensory Communication 2/2Multi Sensory Communication 2/2
Multi Sensory Communication 2/2
 
Embedded systems design @ defcon 2015
Embedded systems design @ defcon 2015Embedded systems design @ defcon 2015
Embedded systems design @ defcon 2015
 
Arduino Workshop @ MSA University
Arduino Workshop @ MSA UniversityArduino Workshop @ MSA University
Arduino Workshop @ MSA University
 
Arduino.pptx
Arduino.pptxArduino.pptx
Arduino.pptx
 
20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris
 
teststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptxteststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptx
 
13223971.ppt
13223971.ppt13223971.ppt
13223971.ppt
 
Syed IoT - module 5
Syed  IoT - module 5Syed  IoT - module 5
Syed IoT - module 5
 
Picmico
PicmicoPicmico
Picmico
 

More from Max Kleiner

More from Max Kleiner (20)

EKON26_VCL4Python.pdf
EKON26_VCL4Python.pdfEKON26_VCL4Python.pdf
EKON26_VCL4Python.pdf
 
EKON26_Open_API_Develop2Cloud.pdf
EKON26_Open_API_Develop2Cloud.pdfEKON26_Open_API_Develop2Cloud.pdf
EKON26_Open_API_Develop2Cloud.pdf
 
maXbox_Starter91_SyntheticData_Implement
maXbox_Starter91_SyntheticData_ImplementmaXbox_Starter91_SyntheticData_Implement
maXbox_Starter91_SyntheticData_Implement
 
maXbox Starter87
maXbox Starter87maXbox Starter87
maXbox Starter87
 
maXbox Starter78 PortablePixmap
maXbox Starter78 PortablePixmapmaXbox Starter78 PortablePixmap
maXbox Starter78 PortablePixmap
 
maXbox starter75 object detection
maXbox starter75 object detectionmaXbox starter75 object detection
maXbox starter75 object detection
 
BASTA 2020 VS Code Data Visualisation
BASTA 2020 VS Code Data VisualisationBASTA 2020 VS Code Data Visualisation
BASTA 2020 VS Code Data Visualisation
 
EKON 24 ML_community_edition
EKON 24 ML_community_editionEKON 24 ML_community_edition
EKON 24 ML_community_edition
 
maxbox starter72 multilanguage coding
maxbox starter72 multilanguage codingmaxbox starter72 multilanguage coding
maxbox starter72 multilanguage coding
 
EKON 23 Code_review_checklist
EKON 23 Code_review_checklistEKON 23 Code_review_checklist
EKON 23 Code_review_checklist
 
EKON 12 Running OpenLDAP
EKON 12 Running OpenLDAP EKON 12 Running OpenLDAP
EKON 12 Running OpenLDAP
 
EKON 12 Closures Coding
EKON 12 Closures CodingEKON 12 Closures Coding
EKON 12 Closures Coding
 
NoGUI maXbox Starter70
NoGUI maXbox Starter70NoGUI maXbox Starter70
NoGUI maXbox Starter70
 
maXbox starter69 Machine Learning VII
maXbox starter69 Machine Learning VIImaXbox starter69 Machine Learning VII
maXbox starter69 Machine Learning VII
 
maXbox starter68 machine learning VI
maXbox starter68 machine learning VImaXbox starter68 machine learning VI
maXbox starter68 machine learning VI
 
maXbox starter67 machine learning V
maXbox starter67 machine learning VmaXbox starter67 machine learning V
maXbox starter67 machine learning V
 
maXbox starter65 machinelearning3
maXbox starter65 machinelearning3maXbox starter65 machinelearning3
maXbox starter65 machinelearning3
 
EKON22_Overview_Machinelearning_Diagrams
EKON22_Overview_Machinelearning_DiagramsEKON22_Overview_Machinelearning_Diagrams
EKON22_Overview_Machinelearning_Diagrams
 
Ekon22 tensorflow machinelearning2
Ekon22 tensorflow machinelearning2Ekon22 tensorflow machinelearning2
Ekon22 tensorflow machinelearning2
 
EKON22 Introduction to Machinelearning
EKON22 Introduction to MachinelearningEKON22 Introduction to Machinelearning
EKON22 Introduction to Machinelearning
 

Recently uploaded

➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
amitlee9823
 
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men 🔝Vijayawada🔝 E...
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men  🔝Vijayawada🔝   E...➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men  🔝Vijayawada🔝   E...
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men 🔝Vijayawada🔝 E...
amitlee9823
 
Call Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night StandCall Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men 🔝Deoghar🔝 Escorts...
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men  🔝Deoghar🔝   Escorts...➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men  🔝Deoghar🔝   Escorts...
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men 🔝Deoghar🔝 Escorts...
amitlee9823
 
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
amitlee9823
 
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
ehyxf
 
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
amitlee9823
 
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Naicy mandal
 
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
amitlee9823
 
CHEAP Call Girls in Ashok Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Ashok Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Ashok Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Ashok Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
 
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
 
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men 🔝Vijayawada🔝 E...
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men  🔝Vijayawada🔝   E...➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men  🔝Vijayawada🔝   E...
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men 🔝Vijayawada🔝 E...
 
SM-N975F esquematico completo - reparación.pdf
SM-N975F esquematico completo - reparación.pdfSM-N975F esquematico completo - reparación.pdf
SM-N975F esquematico completo - reparación.pdf
 
Call Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night StandCall Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night Stand
 
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men 🔝Deoghar🔝 Escorts...
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men  🔝Deoghar🔝   Escorts...➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men  🔝Deoghar🔝   Escorts...
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men 🔝Deoghar🔝 Escorts...
 
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
 
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
 
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
 
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
 
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
 
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
 
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
 
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
 
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
 
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
 
CHEAP Call Girls in Ashok Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Ashok Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Ashok Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Ashok Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Shikrapur Call Girls Most Awaited Fun 6297143586 High Profiles young Beautie...
Shikrapur Call Girls Most Awaited Fun  6297143586 High Profiles young Beautie...Shikrapur Call Girls Most Awaited Fun  6297143586 High Profiles young Beautie...
Shikrapur Call Girls Most Awaited Fun 6297143586 High Profiles young Beautie...
 

Arduino C maXbox web of things slide show

  • 1. Arduino and C# Things Yes, we scan… http://en.wikipedia.org/wiki/Web_of_Things Max Kleiner
  • 2. Be aware of (Web of No Things) 2 • You deal with physics and elements (xyz) • Lots of sensors & actuators to solder • Memory on microcontroller is very small • Which Casing…, ex. 336_digiclock_3.txt • Keep it simple: not (A v B) = not A ^ not B A= A+B, B=A-B, A=A-B • Push a Session or pull a Service ? • Call it Host to Device Ident (master-slave) • Which Use Case ex. App or DigiCam? http://en.wikipedia.org/wiki/Anti-pattern A Short History of Time 1991 Application Program 1995 Application 1998 Applet 2010 App 2015 A (Android, Arduino, ARM)
  • 3. How to Start ? • With a Starter Kit you have everything you need to start learning the basics of electronics: an Arduino UNO, an essential set for wiring things up, a lot of sensors and actuators. 3 Ex. Blink (out of the Box)
  • 4. List of Things 4 • 1 Arduino UNO R3 • 1 Arduino Editor V 1.0.5 • 1 Steckbrett (solderless breadboard) • 1 multiplexed 4-Digit-7-Segment LED Display LN3461AS2B, common cathode, 12 Pins (Bezugsquelle Datenblatt) • 4 Widerstände 680 Ohm (resistor) • 12 Jumperkabel M/M (hookup-wires) • 4 Jumperkabel M/F (jumper-wires) • Stiftleiste 7 Pin einfach (pin strip or socket board) • ein paar Drahtverbindungen, damit das Display im Kabelsalat nicht total verschwindet • RTC-Modul DS1307, konkret ein DS1307 und AT 24C32 Combo Breakout http://en.wikipedia.org/wiki/RFID ex. SimLogicBox - Chess Roboter Topic – First Web of Things
  • 5. Programming Things RTC and COM time consuming process • namespace ch.maxbox.arduino.time { • class ArduinoTimeSetter { • static void Main(string[] args) { • Settings settings = new Settings(); • SerialPort port = new SerialPort(settings.port,9600); • DateTime now = DateTime.Now; • port.Open(); • //time formatting, be aware new format (incl weekdays) for DS1307 • String arduinoTime = String.Format("{0:HHmmssddMMyy}",DateTime.Now)+((int) • DateTime.Now.DayOfWeek); • Console.WriteLine(arduinoTime); • //pass the time to COM • port.Write(arduinoTime); • while (true) { • Console.WriteLine("From Arduino “+ port.ReadLine()); • } • } • } • } 5
  • 6. Proof of Concept Lord of the Things 6
  • 7. Decison Process • Before starting, the following questions should be answered: • What is the scope of the application? • • Monitoring measurements and devices? • • Mobile Gadget? • What is the scenario Use Case? • • A thing with embedded web service? • • A set of things connected through a gateway or bus? • What programming language or IDE? • • Options: C, Pascal, Java, C#, Processing, ADT, AVR Studio, POSIX Cygwin core API, Atmel Programmer • What is the runtime, publishing infrastructure? • • None, custom ASIC, third party (AVR, ARM, Udoo, PIC, PI…). • • Hardware casing, box or integration. 7
  • 8. Function Memory Thinking • function StartLoadSrvc(afname: string): TStringList; • begin • if fileExists(ExePath+'examples/'+afname) then begin • result:= TStringList.create; • result.loadfromFile(ExePath+'examples/'+afname); • end • end; • mycipher:= encrypDecryp(StartLoadSrvc(fname).text,MYKEY,'E') Object Passing: writeln(getFileList(TStringList.create, 'D:kleiner2014EA_docus*.*').strings[i]); 8 036_pas_includetest_basta.txt / 383_MDAC_DCOM.txt Arduino UNO Memory Flash 32,768 bytes non-volatile Stores the program source code and Arduino bootloader SRAM 2048 bytes volatile Operating space for accessing variables and functions EEPROM 1024 bytes non-volatile Permanent storage for user data like readings or settings
  • 9. Use Q Rules • CA1303: Do not pass literals as localized parameters • public void TimeMethod(int hour, int minute) { if (hour < 0 || hour > 23) { MessageBox.Show( "The valid range is 0 - 23."); //CA1303 fires because the parameter for method Show is Text } • CA1302: Do not hardcode locale specific strings • static void Main() { string string0 = "C:"; • Sonar/PMD: Avoid duplicate literals (hard coded string or numeric) 9
  • 10. Case Study • Arduino Uno Board with RGB LED COM Box 10
  • 12. Use Case Shine on you crazy… 12 Send a command over http to com on board to light a rgb led
  • 13. Solution Arduino C 13 Tutor: http://www.softwareschule.ch/download/maxbox_starter18_3.pdf void setup() { // initialize digital pin as an output. pinMode(ledPin11, OUTPUT); Serial.begin(9600); void loop () { val = Serial.read(); //read serial port if (val !=-1){ if (val=='1'){ digitalWrite(ledPin1,HIGH); } else if (val=='A'){ digitalWrite(ledPin1,LOW); } Standard Arduino Library
  • 14. Solution HTTP Server 14 http://www.softwareschule.ch/examples/443_webserver_arduino_rgb_light.txt 76 with HTTPServer do begin 77 if Active then Free; 78 if not Active then begin 79 bindings.Clear; 80 bindings.Add; 81 bindings.items[0].Port:= APORT; 82 bindings.items[0].IP:= IPADDR; //'127.0.0.1'; {GetHostIP} 83 Active:= true; 84 onCommandGet:= @HTTPServerGet; 85 PrintF('Listening HTTP on %s:%d.', [Bindings[0].IP,Bindings[0].Port]); 86 end;
  • 15. Solution COM Port 15 361_heartbeat_wave.txt http://en.wikipedia.org/wiki/Household_appliances 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; procedure HTTPServerGet(aThr: TIdPeerThread; reqInfo: TIdHTTPRequestInfo; respInfo: TIdHTTPResponseInfo);
  • 16. Test the Light http://192.168.1.40:8080/R 16 Ein Spermium enthält 37,5 MB DNA-Daten. Eine Ejakulation entspricht einem Datentransfer von 1500 TB in 3 Sek. Und ihr denkt DSL sei schnell... ;).
  • 17. Thanks! Links to Rights the source is the code 17 http://www.softwareschule.ch/maxbox.htm http://sourceforge.net/projects/maxbox http://sourceforge.net/apps/mediawiki/maxbox/ http://en.wikipedia.org/wiki/Arduino http://www.softwareschule.ch/download/webofthings2013.pdf Book Patterns konkret http://www.amazon.de/Patterns-konkret-Max-Kleiner/dp/3935042469 RTClock, Arduino and C# by Silvia Rothen http://ecotronics.ch.honorius.sui-inter.net/wordpress/2013/arduino- als-uhr-version-2-mit-rtc-komponente-und-led-display/ http://www.ecotronics.ch/ecotron/arduinocheatsheet.htm http://carolinafortuna.com/web-of-things-tutorial/
  • 18. Code a World hack the earth 18 Yes, we hack…