SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
Let’s begin IoT with $10
session1: Introduction, LED brink without solder, and ping reply
makoto
About myself
Name: Makoto
Career: Infrastructure operation(Server,Network)
Dark past: 15 years ago, I tried to PIC micro-controller but, I couldn’t
make it work.I broke it, so had lost tens dollars, several times.
Introduction: I found Arduino as a easier technology for IoT and rejoin
microcontroller world.
It’s my hobby, do not belongs to any ordanizations
Terget group
Target persons
familiar with basic knowledge of TCP/IP
familiar with CLI of OSX,Linux commands
able to spent less than $10
Excluding
Mnemonics programing fundamentalists
A-List Arduino supporters (like Genuino101)
Goal
Linux Arduino
Serial communication
(over USB)
Concept
- Lower cost (less than $5)
- Easier Microcomputer technology
- Attainment of minimum IP connection(ping)
Goal
To prepare mininum Arduino R&D environment, to add IP
address to Arduino, then connect PC to Arduino with serial
comunication, then do ping
 
IP IP
Tradeoff slider
Cost
Newer Tech
Easer Tech
importantunimportant
Compliance to
Local radio lows
Elegant Tech
Scope
SensorMCP
GatewayGatewayAPP
MotorMCP
PC
Server
Public cloud
Internet/Intranet
- wifi
- Ether
- 3G/4G
Arduino 
Linux ARMs
(Raspberry pi etc.)
mbed
Sensors
GPS
Motor Driver
etc.
Why Arduino clone?
easy architecture
Arduino Linux系ARM mbed互換
examples Arduino mini clone
Arduino nano clone
$1.3〜
include shipping
Raspbbery PI zero
($6,but difficult to get)
Orange Pi($10)
C.H.I.P($9)
Nucleo series($15)
computing week
(ATMega8bit/8Mhz〜)
enough(ARM) enough(ARM)
IDE Special IDE(C++like) Linux itself Web IDE(C++like)
memo There are a lot of
strange, cheap Arduino
and their copy
if you are a linuxer, you may
be a little bit boring.
I can give up devices even if i would play it with beer then break these devices
Whay Arduino copy?
cheap
expensive
easy technology
(as beginner)Difficult
technology
●Arduino mini clone
●Arduino nano clone
●Raspberry Pi zero
● mbed compatible
●Orange Pi
●Arduino for geek
(Digispark etc)
●昔からあるマイコン
 (PIC/H8とか)
My Scope
●A-List Arduino
(Genuino101 etc.)
Picture:Raspberry Pi zero and Arduino clones
Raspberry Pi
Digispark(Arduino)
Arduino pro mini
clone
Arduino nano
clone NodeMCU/Amica
clone(*1)
WeMos
clone(*1)
Japanese radio regulation doesn’t permit to use NodeMCU/WeMos because of uncertified devices.
If you want to use WiFi connection, You can use “wroom-02” as a certified device.
Arduinos
cheap Arduino clones
Digispark Arduino pro mini
clone
Arduino nano
clone
Arduino uno
clone
NodeMCU
lowest price $1.15 free
shipping
$1.25 free shipping $1.71 free shipping $2.6 free shipping $3.23 free shipping
Micro-
controller
ATTiny85(8bit) ATmega168(8bit),
ATmega328P(8bit)
ATmega168(8bit),
ATmega328P(8bit)
ATmega328P(8bit) ESP8266
(32bit +WiFi)
Ingerface
(driver)
micro USB
(libusb)
raw UART mini USB 
(CH341, fishy?)
mini USB 
(CH341,fishy?)
micro USB
(CP210x)
IDE Customized
Arduino IDE
Arduino IDE Arduino IDE Arduino IDE ArduinoIDE+liberary
addon
Pros. smallest,
cheepest
cheep,small,
3.3,v5v selectable
famous,a lot of
information
a lot of information
no need of solder
WiFi
a lot of information
Cons special and low
version IDE
lack of USB
required UART
USB is fishy
“mini” USB is rare
“mini” USB is rare
I don’t own it
Japanese regulation
doesn’t permit to use
it
My selecion
Example:Arduino nano 328P on “Aliexpress”
Arduino basic information
❖ No operation system. program keeps running directly on the devices
➢ no standard TCP/IP library. selectable, so you should choice fitting one.
❖ With “UART”, You write program(sketch) to devices and communicate with it.
➢ most of Arduinos have USB controller. use USB to suply power and communicate via UART.
➢ In this case,Arduino seems to be a com port(Serial port) from PC(you can use teraterm)
➢ Physically , Audiono use lower voltage comparing to RS232C(Typical Serial communication for PC)
PC
USB
Arduino本体
USB
Controller UART
Example:Arduino nano
Power supply
Arduino basic information
❖ How to use
➢ With C++ like language, make program on its IDE
➢ compiling and write to Arduino via IDE
➢ Run the programs by reboot, reset or automatically
❖ Weakness of computing comparing to ARMs, such as Raspberry Pi1(a hundredth)
❖ Too small memory space(very surprising for server engineer )
➢ no DRAM, only SRAM
➢ Sometimes “Hanoi tower” stack makes memory leak before CPU limitation
Develop environment
USB cable
Arduino nano本体
PC
Arduino IDE
(Software)
Hardware
● PC(OSX,in my case)
● USB cable
(USB mini, in this case)
● Arduino nano clone
Software
● Arduino IDE
● SerialIP Library
● SUB uart driver
No need(at least today)
● Solder
● bread-board、cable
● register、LED
● sensors
Develop environment(Hardware)
● PC(Mac, in my case)
○ Basically, at least Mac/Windows/Linux is OK.
○ Today, Linux is requried to use SLIP. MAC/Windows already had ended the
“SLIP”Li Linux on Virtualbox or other hypervisors with USB pass through is
acceptable.
● USBケーブル
○ Arduino nano require mini USB. It is different from micro USB(typical USB)
○ mini USB is legacy in macro world, but common in Arduino world
○ There are some USB cable to supply power without data wires.
● Arduino nano clone
○ 2type processor(ATMega168 and 328P)
■ ATmega168: Flash 16KB/SRAM 1KB/ EEPROM 512B/ 180円〜
■ ATmega328: Flash 32KB/SRAM 2KB/ EEPROM 1KB/ 209円〜
○ I recommend online like Aliexpress(http://www.aliexpress.com/)
○ Standard Arduino with the emblem cost 10 times higher!!
We use it!
Today, 168 is not ok
because of memory
Hardware memorandum
● All devices that I ordered could arrive without loss within 3 weeks , but one of
them took more than 1 month.
● I recommend that you order 2 arduinos at different shops as insurance. Even
though, it is cheep.
● Today we don’t use solder, but you cannot escape from it in this field. A simple
and cheep kit is enough. It may cost less than $20.
● How to enjoy
1. Order some cheep devices from your smartphone as your killing time
2. Forget the order
3. After 2weeks, It may arrive. you may develop it with beer and break it
4 Soon, spare one may arrive.
5 Finally you can make it work. cheers!
開発環境:Arduino IDE
❖ Arduino IDE
➢ Download
https://www.arduino.cc/en/Main/Software
➢ Current version is1.6.8. simply uszip it and run.
➢ You push OK button, then work directory “/User/[user name]
/Documents/Arduino” will be created
❖ SUB uart driver
➢ http://www.wch.cn/download/CH341SER_MAC_ZIP.html
➢ OSX and Win are required to install a USB driver(ubuntu14 are not required)
➢ Google said lot of developers are using it and I try to believe this driver.
➢ OSX detect Arduino nano as a serial device with crazy name as below.
➢ This device name may cause problem1(I write it later)
Takahashi-no-MacBook-Pro:~ makotaka$ sudo ls -al /dev/ | grep cu
crw-rw-rw- 1 root wheel 18, 3 4 3 15:24 cu.Bluetooth-Modem
crw-rw-rw- 1 root wheel 18, 1 4 3 15:24 cu.Bluetooth-PDA-Sync
crw-rw-rw- 1 root wheel 18, 93 4 24 14:23 cu.wch ch341 USB=>RS232
開発環境: USB driver
❖ Use embedded LED blinking sample sketch without revising
➢ “File” → ”Example” → ”01.Basics”→”Blink”
❖ Arduino developer call source cord “Sketch”
LED brink:Let’ try to work
❖ Select Board/Processor/Serial port
➢ “Tool” → select “Arduino nano” then “ATmega 328” as processor and
correct usb serial port.
➢ The sample code means
■ Set PIN 13 as OUTPUT
PIN 13 is connected to
embedded LED
■ Set voltage High,then wait 1sec
■ Set voltage Low,then wait 1sec
■ Loop above actions
LED brink:Let’ try to run
LED brink:Let’ try to fail(in case of OSX)
❖ Let’ try to write into your Arduino
❖ You may get failed
LED brink:Let’ try to make it
❖ Spaces in device name caused the error.
❖ A solution is to make a symbolic link named “cu.wch”
-rw- 1 root wheel 18, 93 4 24 14:23 cu.wch ch341 USB=
$ sudo ln -s "/dev/cu.wch ch341 USB=>RS232 fd120" /dev/cu.wch
Password:
$ ls -al /dev/cu.*
crw-rw-rw- 1 root wheel 18, 3 4 3 15:24 /dev/cu.Bluetooth-Modem
crw-rw-rw- 1 root wheel 18, 1 4 3 15:24 /dev/cu.Bluetooth-PDA-Sync
lrwxr-xr-x 1 root wheel 0 4 24 14:20 /dev/cu.wch -> /dev/cu.wch ch341 USB=>RS232 fd120
crw-rw-rw- 1 root wheel 18, 97 4 24 14:46 /dev/cu.wch ch341 USB=>RS232 fd120 ダメなデバイス名
LED brink:Let’ try to rerun
1. Reselect the symbolic link as a
serial port
2. rewrite
3. may succeed
1
2
3
- LED may brink every 1 sec
- Next, you can try to change brink time
❖ Some Arduino nanos are not ready to be written.
❖ push “Reset Button” then when compiling, then release the button just before
IDE start to write binary to your Arduino clone.
-rw- 1 root wheel 18, 93 4 24 14:23 cu.wch ch341 USB=
LED brink:If your arduino clone is not writable,
コレ
Ping: Installation of Serial IP library
❖ SerialIP Library
➢ It’s serial ip communication library for SLIP(historical protocol)
➢ Download
■ http://www.shikadi.net/files/arduino/SerialIP-1.0.zip
➢ Install the library
“Sketch” → “Include Library” → “Add zip Library”
Choose “SerialIP-1.0.zip” you downloaded
Ping:compiling failire
1. File → Example→SerialIP
2. Select “hellowWorlddServer”
3. Try to compile
4. Then get failed
3
2
3
1
❖ The reason is that the library is little bit old for newer IDE.
❖ IDE version is 1.0 or later, you should change a line in 3 files
➢ Open /libraries/SerialIP/SerialIP.h in your work directory
➢ Change WProgram.h to Arduino.h at line 24
➢ Line 21 in clock-arch.c, and line 21 in SerialIP.cppのshould be change
as the same way.
$vi /Users/ユーザ名/Documents/Arduino/libraries/SerialIP/SerialIP.h
24: #include <WProgram.h> #Befroe
24: #include <Arduino.h> #After
Ping:Rewrite SerialIP Files
$vi /Users/ユーザ名/Documents/Arduino/libraries/SerialIP/clock-arch.c
〜略〜
$vi /Users/ユーザ名/Documents/Arduino/libraries/SerialIP1/SerialIP.cpp
〜略〜
❖ Arduino may be ready.
Ping:Arduino is ready
congratulations!
❖ Unfortunately, Windows/OSX had ended “SLIP” support.
❖ At least Linux PC support SLIP.
❖ I don’t have another PC, Inevitably, I use ubuntu14 on VirtualBox with USB
pass-through.
Ping:Ping対向の設定
Virtual Box (MAC)
Arduino
Serial Communication
(SLIP over USB)
IP
VM(ubuntu14)
IP
Arduino nano
IP
(*)SLIP is historical serial protocol older than PPP. evoking nostargia
Ping:ubuntu configuration, Ping to arduino
$sudo modprobe slip
$sudo slattach -L -s 115200 -p slip /dev/ttyUSB0 & #background
$sudo fconfig sl0 192.168.5.1 dstaddr 192.168.5.2
$ping 192.168.5.2
PING 192.168.5.2 (192.168.5.2) 56(84) bytes of data.
64 bytes from 192.168.5.2: icmp_seq=1 ttl=64 time=29.8 ms
64 bytes from 192.168.5.2: icmp_seq=2 ttl=64 time=32.8 ms
64 bytes from 192.168.5.2: icmp_seq=3 ttl=64 time=36.5 ms
^C
--- 192.168.5.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 29.850/33.060/36.528/2.740 ms
$ifconfig sl0
sl0 Link encap:シリアルラインIP
inetアドレス:192.168.5.1 P-t-P:192.168.5.2 マスク:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:296 メトリック:1
RXパケット:3 エラー:0 損失:0 オーバラン:0 フレーム:0
TXパケット:3 エラー:0 損失:0 オーバラン:0 キャリア:0
衝突(Collisions):0 TXキュー長:10
RXバイト:252 (252.0 B) TXバイト:252 (252.0 B)
Ping:TCP connection
❖ ordinary, this example sketch is for Arduino TCP listen. So you can connect to
  TCP port 1000 by telnet. You can also customize the example sketch.
NEXT session: Ethernet+MQTT
LAN Cable($.99)
F-F cable7wires
($0.7/20wires. I suggest
that you buy M-M/M-F
cable at once. It may be
required)
“ENC28J60” , cheap
Ethernet module
($2.4)
Arduino nano
(We used today)
Arduino nano
ENC28J60
MQTT broker
(Linux)
SPI
Ethernet
1. Next, devices&tools totally costs less than $5 are needed. Solder is also required.
2. We just need a cheap solder kit. you can study
3. you can study solder at https://www.youtube.com/watch?v=37mW1i_oEpA
LAN

Weitere ähnliche Inhalte

Was ist angesagt?

Esp8266 NodeMCU
Esp8266 NodeMCUEsp8266 NodeMCU
Esp8266 NodeMCUroadster43
 
Esp8266 - Intro for dummies
Esp8266 - Intro for dummiesEsp8266 - Intro for dummies
Esp8266 - Intro for dummiesPavlos Isaris
 
Nodemcu - introduction
Nodemcu - introductionNodemcu - introduction
Nodemcu - introductionMichal Sedlak
 
NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1Andy Gelme
 
Espresso Lite v2 - ESP8266 Overview
Espresso Lite v2 - ESP8266 OverviewEspresso Lite v2 - ESP8266 Overview
Espresso Lite v2 - ESP8266 OverviewThe World Bank
 
IoT Hands-On-Lab, KINGS, 2019
IoT Hands-On-Lab, KINGS, 2019IoT Hands-On-Lab, KINGS, 2019
IoT Hands-On-Lab, KINGS, 2019Jong-Hyun Kim
 
How to Install ESP8266 WiFi Web Server using Arduino IDE
How to Install ESP8266 WiFi Web Server using Arduino IDEHow to Install ESP8266 WiFi Web Server using Arduino IDE
How to Install ESP8266 WiFi Web Server using Arduino IDENaoto MATSUMOTO
 
Arduino Meetup with Sonar and 433Mhz Radios
Arduino Meetup with Sonar and 433Mhz RadiosArduino Meetup with Sonar and 433Mhz Radios
Arduino Meetup with Sonar and 433Mhz Radiosroadster43
 
[Ruxcon 2011] Post Memory Corruption Memory Analysis
[Ruxcon 2011] Post Memory Corruption Memory Analysis[Ruxcon 2011] Post Memory Corruption Memory Analysis
[Ruxcon 2011] Post Memory Corruption Memory AnalysisMoabi.com
 
Internet Of Things: Hands on: YOW! night
Internet Of Things: Hands on: YOW! nightInternet Of Things: Hands on: YOW! night
Internet Of Things: Hands on: YOW! nightAndy Gelme
 
Introduction to ESP32 Programming [Road to RIoT 2017]
Introduction to ESP32 Programming [Road to RIoT 2017]Introduction to ESP32 Programming [Road to RIoT 2017]
Introduction to ESP32 Programming [Road to RIoT 2017]Alwin Arrasyid
 
DefCon 2012 - Hardware Backdooring (Slides)
DefCon 2012 - Hardware Backdooring (Slides)DefCon 2012 - Hardware Backdooring (Slides)
DefCon 2012 - Hardware Backdooring (Slides)Michael Smith
 
Adafruit Huzzah Esp8266 WiFi Board
Adafruit Huzzah Esp8266 WiFi BoardAdafruit Huzzah Esp8266 WiFi Board
Adafruit Huzzah Esp8266 WiFi BoardBiagio Botticelli
 
Hardware hacking for software people
Hardware hacking for software peopleHardware hacking for software people
Hardware hacking for software peopleDobrica Pavlinušić
 
Rdl esp32 development board trainer kit
Rdl esp32 development board trainer kitRdl esp32 development board trainer kit
Rdl esp32 development board trainer kitResearch Design Lab
 

Was ist angesagt? (20)

Esp8266 NodeMCU
Esp8266 NodeMCUEsp8266 NodeMCU
Esp8266 NodeMCU
 
Esp8266 - Intro for dummies
Esp8266 - Intro for dummiesEsp8266 - Intro for dummies
Esp8266 - Intro for dummies
 
lwM2M OTA for ESP8266
lwM2M OTA for ESP8266lwM2M OTA for ESP8266
lwM2M OTA for ESP8266
 
Nodemcu - introduction
Nodemcu - introductionNodemcu - introduction
Nodemcu - introduction
 
NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1
 
Esp8266 basics
Esp8266 basicsEsp8266 basics
Esp8266 basics
 
Espresso Lite v2 - ESP8266 Overview
Espresso Lite v2 - ESP8266 OverviewEspresso Lite v2 - ESP8266 Overview
Espresso Lite v2 - ESP8266 Overview
 
IoT Hands-On-Lab, KINGS, 2019
IoT Hands-On-Lab, KINGS, 2019IoT Hands-On-Lab, KINGS, 2019
IoT Hands-On-Lab, KINGS, 2019
 
How to Install ESP8266 WiFi Web Server using Arduino IDE
How to Install ESP8266 WiFi Web Server using Arduino IDEHow to Install ESP8266 WiFi Web Server using Arduino IDE
How to Install ESP8266 WiFi Web Server using Arduino IDE
 
Arduino Meetup with Sonar and 433Mhz Radios
Arduino Meetup with Sonar and 433Mhz RadiosArduino Meetup with Sonar and 433Mhz Radios
Arduino Meetup with Sonar and 433Mhz Radios
 
[Ruxcon 2011] Post Memory Corruption Memory Analysis
[Ruxcon 2011] Post Memory Corruption Memory Analysis[Ruxcon 2011] Post Memory Corruption Memory Analysis
[Ruxcon 2011] Post Memory Corruption Memory Analysis
 
Internet Of Things: Hands on: YOW! night
Internet Of Things: Hands on: YOW! nightInternet Of Things: Hands on: YOW! night
Internet Of Things: Hands on: YOW! night
 
Introduction to ESP32 Programming [Road to RIoT 2017]
Introduction to ESP32 Programming [Road to RIoT 2017]Introduction to ESP32 Programming [Road to RIoT 2017]
Introduction to ESP32 Programming [Road to RIoT 2017]
 
DefCon 2012 - Hardware Backdooring (Slides)
DefCon 2012 - Hardware Backdooring (Slides)DefCon 2012 - Hardware Backdooring (Slides)
DefCon 2012 - Hardware Backdooring (Slides)
 
Maker Movement
Maker MovementMaker Movement
Maker Movement
 
Gnu linux on arm for $50 - $100
Gnu linux on arm for $50 - $100Gnu linux on arm for $50 - $100
Gnu linux on arm for $50 - $100
 
Adafruit Huzzah Esp8266 WiFi Board
Adafruit Huzzah Esp8266 WiFi BoardAdafruit Huzzah Esp8266 WiFi Board
Adafruit Huzzah Esp8266 WiFi Board
 
Hardware hacking for software people
Hardware hacking for software peopleHardware hacking for software people
Hardware hacking for software people
 
Rdl esp32 development board trainer kit
Rdl esp32 development board trainer kitRdl esp32 development board trainer kit
Rdl esp32 development board trainer kit
 
ESP8266 Wifi Nodemcu
ESP8266 Wifi Nodemcu ESP8266 Wifi Nodemcu
ESP8266 Wifi Nodemcu
 

Ähnlich wie Let's begin io t with $10

A BEGINNER’S JOURNEY INTO THE WORLD OF HARDWARE HACKING
A BEGINNER’S JOURNEY INTO THE WORLD OF HARDWARE HACKINGA BEGINNER’S JOURNEY INTO THE WORLD OF HARDWARE HACKING
A BEGINNER’S JOURNEY INTO THE WORLD OF HARDWARE HACKINGSilvio Cesare
 
Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PICliff Samuels Jr.
 
Taking the hard out of hardware
Taking the hard out of hardwareTaking the hard out of hardware
Taking the hard out of hardwareRonald McCollam
 
Arduino spooky projects_class1
Arduino spooky projects_class1Arduino spooky projects_class1
Arduino spooky projects_class1Felipe Belarmino
 
Introducing... Arduino
Introducing... ArduinoIntroducing... Arduino
Introducing... Arduinozvikapika
 
Embedded application development
Embedded application developmentEmbedded application development
Embedded application developmentAakash Raj
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitSulamita Garcia
 
Arduino workshop
Arduino workshopArduino workshop
Arduino workshopmayur1432
 
Introduction to Arduino
Introduction to Arduino Introduction to Arduino
Introduction to Arduino Dennis Espiritu
 

Ähnlich wie Let's begin io t with $10 (20)

Hardware hacking
Hardware hackingHardware hacking
Hardware hacking
 
A BEGINNER’S JOURNEY INTO THE WORLD OF HARDWARE HACKING
A BEGINNER’S JOURNEY INTO THE WORLD OF HARDWARE HACKINGA BEGINNER’S JOURNEY INTO THE WORLD OF HARDWARE HACKING
A BEGINNER’S JOURNEY INTO THE WORLD OF HARDWARE HACKING
 
Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PI
 
Taking the hard out of hardware
Taking the hard out of hardwareTaking the hard out of hardware
Taking the hard out of hardware
 
arduino.pdf
arduino.pdfarduino.pdf
arduino.pdf
 
What is Arduino ?
What is Arduino ?What is Arduino ?
What is Arduino ?
 
How to Hack Edison
How to Hack EdisonHow to Hack Edison
How to Hack Edison
 
Arduino Hands-on Workshop
Arduino Hands-on WorkshopArduino Hands-on Workshop
Arduino Hands-on Workshop
 
Arduino
ArduinoArduino
Arduino
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Arduino spooky projects_class1
Arduino spooky projects_class1Arduino spooky projects_class1
Arduino spooky projects_class1
 
Introducing... Arduino
Introducing... ArduinoIntroducing... Arduino
Introducing... Arduino
 
Embedded application development
Embedded application developmentEmbedded application development
Embedded application development
 
Indroduction arduino
Indroduction arduinoIndroduction arduino
Indroduction arduino
 
Indroduction the arduino
Indroduction the arduinoIndroduction the arduino
Indroduction the arduino
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer Kit
 
Intro arduino
Intro arduinoIntro arduino
Intro arduino
 
Arduino
ArduinoArduino
Arduino
 
Arduino workshop
Arduino workshopArduino workshop
Arduino workshop
 
Introduction to Arduino
Introduction to Arduino Introduction to Arduino
Introduction to Arduino
 

Kürzlich hochgeladen

Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaDubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaUnited Arab Emirates
 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...Pooja Nehwal
 
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...Call Girls in Nagpur High Profile
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | DelhiFULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhisoniya singh
 
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样qaffana
 
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
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...tanu pandey
 
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...motiram463
 
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...Pooja Nehwal
 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gapedkojalkojal131
 
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311  Call Girls in Thane , Independent Escort Service ThanePallawi 9167673311  Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service ThanePooja Nehwal
 
Thane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsThane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsPooja Nehwal
 
VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...
VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...
VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...Call Girls in Nagpur High Profile
 
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...Call Girls in Nagpur High Profile
 

Kürzlich hochgeladen (20)

Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaDubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
 
Call Girls In Vaishali 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In Vaishali 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In Vaishali 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In Vaishali 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
 
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | DelhiFULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
 
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
 
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts 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...
 
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
 
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
 
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
 
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311  Call Girls in Thane , Independent Escort Service ThanePallawi 9167673311  Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
 
young call girls in Sainik Farm 🔝 9953056974 🔝 Delhi escort Service
young call girls in Sainik Farm 🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Sainik Farm 🔝 9953056974 🔝 Delhi escort Service
young call girls in Sainik Farm 🔝 9953056974 🔝 Delhi escort Service
 
Thane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsThane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call Girls
 
VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...
VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...
VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...
 
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...
 

Let's begin io t with $10

  • 1. Let’s begin IoT with $10 session1: Introduction, LED brink without solder, and ping reply makoto
  • 2. About myself Name: Makoto Career: Infrastructure operation(Server,Network) Dark past: 15 years ago, I tried to PIC micro-controller but, I couldn’t make it work.I broke it, so had lost tens dollars, several times. Introduction: I found Arduino as a easier technology for IoT and rejoin microcontroller world. It’s my hobby, do not belongs to any ordanizations
  • 3. Terget group Target persons familiar with basic knowledge of TCP/IP familiar with CLI of OSX,Linux commands able to spent less than $10 Excluding Mnemonics programing fundamentalists A-List Arduino supporters (like Genuino101)
  • 4. Goal Linux Arduino Serial communication (over USB) Concept - Lower cost (less than $5) - Easier Microcomputer technology - Attainment of minimum IP connection(ping) Goal To prepare mininum Arduino R&D environment, to add IP address to Arduino, then connect PC to Arduino with serial comunication, then do ping   IP IP
  • 5. Tradeoff slider Cost Newer Tech Easer Tech importantunimportant Compliance to Local radio lows Elegant Tech
  • 6. Scope SensorMCP GatewayGatewayAPP MotorMCP PC Server Public cloud Internet/Intranet - wifi - Ether - 3G/4G Arduino  Linux ARMs (Raspberry pi etc.) mbed Sensors GPS Motor Driver etc.
  • 7. Why Arduino clone? easy architecture Arduino Linux系ARM mbed互換 examples Arduino mini clone Arduino nano clone $1.3〜 include shipping Raspbbery PI zero ($6,but difficult to get) Orange Pi($10) C.H.I.P($9) Nucleo series($15) computing week (ATMega8bit/8Mhz〜) enough(ARM) enough(ARM) IDE Special IDE(C++like) Linux itself Web IDE(C++like) memo There are a lot of strange, cheap Arduino and their copy if you are a linuxer, you may be a little bit boring. I can give up devices even if i would play it with beer then break these devices
  • 8. Whay Arduino copy? cheap expensive easy technology (as beginner)Difficult technology ●Arduino mini clone ●Arduino nano clone ●Raspberry Pi zero ● mbed compatible ●Orange Pi ●Arduino for geek (Digispark etc) ●昔からあるマイコン  (PIC/H8とか) My Scope ●A-List Arduino (Genuino101 etc.)
  • 9. Picture:Raspberry Pi zero and Arduino clones Raspberry Pi Digispark(Arduino) Arduino pro mini clone Arduino nano clone NodeMCU/Amica clone(*1) WeMos clone(*1) Japanese radio regulation doesn’t permit to use NodeMCU/WeMos because of uncertified devices. If you want to use WiFi connection, You can use “wroom-02” as a certified device.
  • 10. Arduinos cheap Arduino clones Digispark Arduino pro mini clone Arduino nano clone Arduino uno clone NodeMCU lowest price $1.15 free shipping $1.25 free shipping $1.71 free shipping $2.6 free shipping $3.23 free shipping Micro- controller ATTiny85(8bit) ATmega168(8bit), ATmega328P(8bit) ATmega168(8bit), ATmega328P(8bit) ATmega328P(8bit) ESP8266 (32bit +WiFi) Ingerface (driver) micro USB (libusb) raw UART mini USB  (CH341, fishy?) mini USB  (CH341,fishy?) micro USB (CP210x) IDE Customized Arduino IDE Arduino IDE Arduino IDE Arduino IDE ArduinoIDE+liberary addon Pros. smallest, cheepest cheep,small, 3.3,v5v selectable famous,a lot of information a lot of information no need of solder WiFi a lot of information Cons special and low version IDE lack of USB required UART USB is fishy “mini” USB is rare “mini” USB is rare I don’t own it Japanese regulation doesn’t permit to use it My selecion
  • 11. Example:Arduino nano 328P on “Aliexpress”
  • 12. Arduino basic information ❖ No operation system. program keeps running directly on the devices ➢ no standard TCP/IP library. selectable, so you should choice fitting one. ❖ With “UART”, You write program(sketch) to devices and communicate with it. ➢ most of Arduinos have USB controller. use USB to suply power and communicate via UART. ➢ In this case,Arduino seems to be a com port(Serial port) from PC(you can use teraterm) ➢ Physically , Audiono use lower voltage comparing to RS232C(Typical Serial communication for PC) PC USB Arduino本体 USB Controller UART Example:Arduino nano Power supply
  • 13. Arduino basic information ❖ How to use ➢ With C++ like language, make program on its IDE ➢ compiling and write to Arduino via IDE ➢ Run the programs by reboot, reset or automatically ❖ Weakness of computing comparing to ARMs, such as Raspberry Pi1(a hundredth) ❖ Too small memory space(very surprising for server engineer ) ➢ no DRAM, only SRAM ➢ Sometimes “Hanoi tower” stack makes memory leak before CPU limitation
  • 14. Develop environment USB cable Arduino nano本体 PC Arduino IDE (Software) Hardware ● PC(OSX,in my case) ● USB cable (USB mini, in this case) ● Arduino nano clone Software ● Arduino IDE ● SerialIP Library ● SUB uart driver No need(at least today) ● Solder ● bread-board、cable ● register、LED ● sensors
  • 15. Develop environment(Hardware) ● PC(Mac, in my case) ○ Basically, at least Mac/Windows/Linux is OK. ○ Today, Linux is requried to use SLIP. MAC/Windows already had ended the “SLIP”Li Linux on Virtualbox or other hypervisors with USB pass through is acceptable. ● USBケーブル ○ Arduino nano require mini USB. It is different from micro USB(typical USB) ○ mini USB is legacy in macro world, but common in Arduino world ○ There are some USB cable to supply power without data wires. ● Arduino nano clone ○ 2type processor(ATMega168 and 328P) ■ ATmega168: Flash 16KB/SRAM 1KB/ EEPROM 512B/ 180円〜 ■ ATmega328: Flash 32KB/SRAM 2KB/ EEPROM 1KB/ 209円〜 ○ I recommend online like Aliexpress(http://www.aliexpress.com/) ○ Standard Arduino with the emblem cost 10 times higher!! We use it! Today, 168 is not ok because of memory
  • 16. Hardware memorandum ● All devices that I ordered could arrive without loss within 3 weeks , but one of them took more than 1 month. ● I recommend that you order 2 arduinos at different shops as insurance. Even though, it is cheep. ● Today we don’t use solder, but you cannot escape from it in this field. A simple and cheep kit is enough. It may cost less than $20. ● How to enjoy 1. Order some cheep devices from your smartphone as your killing time 2. Forget the order 3. After 2weeks, It may arrive. you may develop it with beer and break it 4 Soon, spare one may arrive. 5 Finally you can make it work. cheers!
  • 17. 開発環境:Arduino IDE ❖ Arduino IDE ➢ Download https://www.arduino.cc/en/Main/Software ➢ Current version is1.6.8. simply uszip it and run. ➢ You push OK button, then work directory “/User/[user name] /Documents/Arduino” will be created
  • 18. ❖ SUB uart driver ➢ http://www.wch.cn/download/CH341SER_MAC_ZIP.html ➢ OSX and Win are required to install a USB driver(ubuntu14 are not required) ➢ Google said lot of developers are using it and I try to believe this driver. ➢ OSX detect Arduino nano as a serial device with crazy name as below. ➢ This device name may cause problem1(I write it later) Takahashi-no-MacBook-Pro:~ makotaka$ sudo ls -al /dev/ | grep cu crw-rw-rw- 1 root wheel 18, 3 4 3 15:24 cu.Bluetooth-Modem crw-rw-rw- 1 root wheel 18, 1 4 3 15:24 cu.Bluetooth-PDA-Sync crw-rw-rw- 1 root wheel 18, 93 4 24 14:23 cu.wch ch341 USB=>RS232 開発環境: USB driver
  • 19. ❖ Use embedded LED blinking sample sketch without revising ➢ “File” → ”Example” → ”01.Basics”→”Blink” ❖ Arduino developer call source cord “Sketch” LED brink:Let’ try to work
  • 20. ❖ Select Board/Processor/Serial port ➢ “Tool” → select “Arduino nano” then “ATmega 328” as processor and correct usb serial port. ➢ The sample code means ■ Set PIN 13 as OUTPUT PIN 13 is connected to embedded LED ■ Set voltage High,then wait 1sec ■ Set voltage Low,then wait 1sec ■ Loop above actions LED brink:Let’ try to run
  • 21. LED brink:Let’ try to fail(in case of OSX) ❖ Let’ try to write into your Arduino ❖ You may get failed
  • 22. LED brink:Let’ try to make it ❖ Spaces in device name caused the error. ❖ A solution is to make a symbolic link named “cu.wch” -rw- 1 root wheel 18, 93 4 24 14:23 cu.wch ch341 USB= $ sudo ln -s "/dev/cu.wch ch341 USB=>RS232 fd120" /dev/cu.wch Password: $ ls -al /dev/cu.* crw-rw-rw- 1 root wheel 18, 3 4 3 15:24 /dev/cu.Bluetooth-Modem crw-rw-rw- 1 root wheel 18, 1 4 3 15:24 /dev/cu.Bluetooth-PDA-Sync lrwxr-xr-x 1 root wheel 0 4 24 14:20 /dev/cu.wch -> /dev/cu.wch ch341 USB=>RS232 fd120 crw-rw-rw- 1 root wheel 18, 97 4 24 14:46 /dev/cu.wch ch341 USB=>RS232 fd120 ダメなデバイス名
  • 23. LED brink:Let’ try to rerun 1. Reselect the symbolic link as a serial port 2. rewrite 3. may succeed 1 2 3 - LED may brink every 1 sec - Next, you can try to change brink time
  • 24. ❖ Some Arduino nanos are not ready to be written. ❖ push “Reset Button” then when compiling, then release the button just before IDE start to write binary to your Arduino clone. -rw- 1 root wheel 18, 93 4 24 14:23 cu.wch ch341 USB= LED brink:If your arduino clone is not writable, コレ
  • 25. Ping: Installation of Serial IP library ❖ SerialIP Library ➢ It’s serial ip communication library for SLIP(historical protocol) ➢ Download ■ http://www.shikadi.net/files/arduino/SerialIP-1.0.zip ➢ Install the library “Sketch” → “Include Library” → “Add zip Library” Choose “SerialIP-1.0.zip” you downloaded
  • 26. Ping:compiling failire 1. File → Example→SerialIP 2. Select “hellowWorlddServer” 3. Try to compile 4. Then get failed 3 2 3 1
  • 27. ❖ The reason is that the library is little bit old for newer IDE. ❖ IDE version is 1.0 or later, you should change a line in 3 files ➢ Open /libraries/SerialIP/SerialIP.h in your work directory ➢ Change WProgram.h to Arduino.h at line 24 ➢ Line 21 in clock-arch.c, and line 21 in SerialIP.cppのshould be change as the same way. $vi /Users/ユーザ名/Documents/Arduino/libraries/SerialIP/SerialIP.h 24: #include <WProgram.h> #Befroe 24: #include <Arduino.h> #After Ping:Rewrite SerialIP Files $vi /Users/ユーザ名/Documents/Arduino/libraries/SerialIP/clock-arch.c 〜略〜 $vi /Users/ユーザ名/Documents/Arduino/libraries/SerialIP1/SerialIP.cpp 〜略〜
  • 28. ❖ Arduino may be ready. Ping:Arduino is ready congratulations!
  • 29. ❖ Unfortunately, Windows/OSX had ended “SLIP” support. ❖ At least Linux PC support SLIP. ❖ I don’t have another PC, Inevitably, I use ubuntu14 on VirtualBox with USB pass-through. Ping:Ping対向の設定 Virtual Box (MAC) Arduino Serial Communication (SLIP over USB) IP VM(ubuntu14) IP Arduino nano IP (*)SLIP is historical serial protocol older than PPP. evoking nostargia
  • 30. Ping:ubuntu configuration, Ping to arduino $sudo modprobe slip $sudo slattach -L -s 115200 -p slip /dev/ttyUSB0 & #background $sudo fconfig sl0 192.168.5.1 dstaddr 192.168.5.2 $ping 192.168.5.2 PING 192.168.5.2 (192.168.5.2) 56(84) bytes of data. 64 bytes from 192.168.5.2: icmp_seq=1 ttl=64 time=29.8 ms 64 bytes from 192.168.5.2: icmp_seq=2 ttl=64 time=32.8 ms 64 bytes from 192.168.5.2: icmp_seq=3 ttl=64 time=36.5 ms ^C --- 192.168.5.2 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 29.850/33.060/36.528/2.740 ms $ifconfig sl0 sl0 Link encap:シリアルラインIP inetアドレス:192.168.5.1 P-t-P:192.168.5.2 マスク:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:296 メトリック:1 RXパケット:3 エラー:0 損失:0 オーバラン:0 フレーム:0 TXパケット:3 エラー:0 損失:0 オーバラン:0 キャリア:0 衝突(Collisions):0 TXキュー長:10 RXバイト:252 (252.0 B) TXバイト:252 (252.0 B)
  • 31. Ping:TCP connection ❖ ordinary, this example sketch is for Arduino TCP listen. So you can connect to   TCP port 1000 by telnet. You can also customize the example sketch.
  • 32. NEXT session: Ethernet+MQTT LAN Cable($.99) F-F cable7wires ($0.7/20wires. I suggest that you buy M-M/M-F cable at once. It may be required) “ENC28J60” , cheap Ethernet module ($2.4) Arduino nano (We used today) Arduino nano ENC28J60 MQTT broker (Linux) SPI Ethernet 1. Next, devices&tools totally costs less than $5 are needed. Solder is also required. 2. We just need a cheap solder kit. you can study 3. you can study solder at https://www.youtube.com/watch?v=37mW1i_oEpA LAN