Your SlideShare is downloading. ×
0
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
AWS ロボを作ろう JAWSUG Kobe
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

AWS ロボを作ろう JAWSUG Kobe

184

Published on

AWSロボを作る親子イベント

AWSロボを作る親子イベント

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
184
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. !  JAWSUG –  –  – IoT –  – 
  • 2. CloudSearch Route53 S3 DynamoDB
  • 3. !  B !  !  SD !  LAN BUFFALO WLIBUCBGNM !  × SG90 !  × !  ! 
  • 4. ON
  • 5. !  PC Wifi awsrobo01 / awsrobo01 !  ssh pi@rasXX.local •  XX 00 19 •  pi raspberry !  AWS SDK curl https://bootstrap.pypa.io/getBpip.py | sudo python sudo pip install boto BBupgrade !  wget http://bit.ly/1TAYwrN BO robo.py !  sudo python robo.py
  • 6. robo.py # -*- coding: utf-8 -*- import RPi.GPIO as GPIO import time import os import sys import boto from boto.sqs.message import RawMessage ###### GPIO Initialization ##### GPIO.cleanup() ###### Action 00 ##### def action_00(): GPIO.setmode(GPIO.BCM) GPIO.setup(23, GPIO.OUT) GPIO.setup(24, GPIO.OUT) p1 = GPIO.PWM(23, 50) p2 = GPIO.PWM(24, 50) p1.start(7.5) p2.start(7.5) try: p1.ChangeDutyCycle(7.5) p2.ChangeDutyCycle(7.5) time.sleep(0.3) GPIO.cleanup() except KeyboardInterrupt: GPIO.cleanup() ###### Action 01 ##### def action_01(): GPIO.setmode(GPIO.BCM) GPIO.setup(23, GPIO.OUT) GPIO.setup(24, GPIO.OUT) p1 = GPIO.PWM(23, 50) p2 = GPIO.PWM(24, 50) p1.start(7.5) p2.start(7.5) try: for var in range(0, 4): p1.ChangeDutyCycle(9.5) p2.ChangeDutyCycle(9.5) time.sleep(0.4) p1.ChangeDutyCycle(5.5) p2.ChangeDutyCycle(5.5) time.sleep(0.4) p1.ChangeDutyCycle(7.5) p2.ChangeDutyCycle(7.5) time.sleep(0.3) GPIO.cleanup() except KeyboardInterrupt: GPIO.cleanup() ##### Main ##### action_00() action_01()
  • 7. SQS ##### Main ##### #action_00() #action_01() conn = boto.connect_sqs('ACCESS_KEY','SECRET_KEY') queue = conn.get_queue('QUEUE_NAME') queue.set_message_class(RawMessage) while 1: messages = queue.get_messages(1) for message in messages: msg = message.get_body() print(msg) queue.delete_message(message) action_00() action_01() •  •  •  •  ##### Main ##### action_00() action_01() """ conn = boto.connect_sqs('ACCESS_KEY','SECRET_KEY') queue = conn.get_queue('QUEUE_NAME') queue.set_message_class(RawMessage) while 1: messages = queue.get_messages(1) for message in messages: msg = message.get_body() print(msg) queue.delete_message(message) action_00() action_01() """
  • 8. !  suto halt 5 USB !  sudo reboot

×