Apakah kamu punya waktu sebentar? Bisakah Anda memotong rumput saya?
-. . ?
mowmylawn.ru !

2015,
GT , .
Robomow . , .
-. . 15, .
, (), 'Belmower': . , .
: . Raspberrry Pi — . , , . Nucleo stm32 — . , , .
: RTK, . .
: GPS/GLONASS. . . .


..,
, , . , . , , — ( , ).
. , . . . 4 . , - , .
2016. ROS & FUN
ROS , Kinect SLAM, . Kinect . ROS «Hello World!», . , . - ,
ROS ?
.

« » , Arduino. ! , ! .
— , . , - . Boston Dynamics, Darpa -, , , .
— , , . «» bluetooth .

. ! .
— ! bluetooth, , . , !
? , ? ...
hallenge accepted!
Raspberry pi, USB , wifi-, -.
. . H- () . , .

4 , .. 8 2 .

, - , , 5 .
, 3 /. ftp- . ivideon.
Arduino serial- , . , raspberry bluetooth, .
Arduinoint m1=2;
int m1b=3;
int m2=4;
int m2b=5;
int mk=6;
int pis=7;
char a,b;
void setup()
{
Serial.begin(9600);
Serial1.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
while (!Serial1) {
; // wait for serial port to connect. Needed for Leonardo only
}
Serial.println("Start");
pinMode(statpin, OUTPUT);
pinMode(m1, OUTPUT);
pinMode(m1b, OUTPUT);
pinMode(m2, OUTPUT);
pinMode(m2b, OUTPUT);
pinMode(mk, OUTPUT);
pinMode(pis, OUTPUT);
analogWrite(pis, 1000);
delay(100);
analogWrite(pis, 700);
delay(200);
analogWrite(pis, 300);
delay(300);
analogWrite(pis, 1000);
delay(100);
analogWrite(pis, 100);
digitalWrite(pis, HIGH);
digitalWrite(statpin, LOW);
digitalWrite(m1, LOW);
digitalWrite(m1b, LOW);
digitalWrite(m2, LOW);
digitalWrite(m2b, LOW);
digitalWrite(mk, LOW);
digitalWrite(pis, HIGH);
}
void loop() // run over and over
{
if (Serial.available()){
a=Serial.read();
Serial1.println(a);
if(a=='B'){
digitalWrite(m1, HIGH);
digitalWrite(m1b, LOW);
digitalWrite(m2, HIGH);
digitalWrite(m2b, LOW);
}
if(a=='F'){
digitalWrite(m1, HIGH);
digitalWrite(m1b, HIGH);
digitalWrite(m2, HIGH);
digitalWrite(m2b, HIGH);
}
if(a=='R'){
digitalWrite(m1, HIGH);
digitalWrite(m1b, LOW);
digitalWrite(m2, HIGH);
digitalWrite(m2b, HIGH);
}
if(a=='L'){
digitalWrite(m1, HIGH);
digitalWrite(m1b, HIGH);
digitalWrite(m2, HIGH);
digitalWrite(m2b, LOW);
}
if(a=='S'){
digitalWrite(m1, LOW);
digitalWrite(m1b, LOW);
digitalWrite(m2, LOW);
digitalWrite(m2b, LOW);
}
if(a=='W'){
digitalWrite(mk, HIGH);
}
if(a=='w'){
digitalWrite(mk, LOW);
}
if(a=='V'){
digitalWrite(pis, LOW);
}
if(a=='v'){
digitalWrite(pis, 700);
}
}else{
}
}
raspberry python . opencv -, ftp . , - ,
twitter-.
import numpy as np
import sys
import pygame
import pygame.camera
from pygame.locals import *
from twython import Twython
from random import random
import ftplib
pygame.init()
pygame.camera.init()
cam = pygame.camera.Camera("/dev/video0",(550,400))
cam.start()
CONSUMER_KEY = '-------MBZDT1PwibFeIcSp'
CONSUMER_SECRET = '-----------------1ZGHgBRz6aEr4YhUVuO84CuEV'
ACCESS_KEY = '-----------------4MCjSkny9Y6rJj5I32ulXctISQF'
ACCESS_SECRET = '------------------------cDadRY3He5Kv6CXVuqy2Dh'
api = Twython(CONSUMER_KEY,CONSUMER_SECRET,ACCESS_KEY,ACCESS_SECRET)
api.verify_credentials()
host = "-.--.---.196"
ftp_user = "ftp_user"
ftp_password = "ftp_password"
con = ftplib.FTP(host, ftp_user, ftp_password)
con.cwd("/mowmylawn.ru/webcam")
a={0:' ! !',1:' . !',2:' ... ',3:' ?',4:', !',5:' , :)) !',6:', ... !',7:' , .',8:' : - ',9:' — , ...',10:' : ?',11:' ',11:'-, ',12:' - , .',13:'— ! — , !',14:', ! ...:(((!',15:' ? robogazon.ru',16:' , !'}
def twit():
image = cam.get_image()
pygame.image.save(image,'webcam.jpg')
photo = open('webcam.jpg','rb')
b = random() * (len(a)-1)
b = int(round(b,0))
api.update_status_with_media(media=photo, status=a[b])
def ftpimg():
image = cam.get_image()
pygame.image.save(image,'webcam.jpg')
photo = open('webcam.jpg','rb')
send = con.storbinary("STOR "+ 'webcam.jpg', photo)
while 1 :
ftpimg()
b = random() * (500)
b = int(round(b,0))
if b==107:
twit()
con.close
http serial arduino.
- «S» —
- «F» —
- «B» —
- «L» —
- «R» —
- «W» —
- «w» —
- «V» —
- «v» —
import serial,time
import urllib3
http = urllib3.PoolManager()
ser = serial.Serial("/dev/ttyUSB0",9600)
ser.writelines("S");
olddata=0
countolddata=0
while 1 :
r = http.request('GET', 'http://mowmylawn.ru/1.php')
if r.data!=olddata:
olddata=r.data
countolddata=0
else:
countolddata+=1
if countolddata>20:
ser.writelines("S")
else:
ser.writelines(r.data)
ser.close()
con.close
-
bootstrap . .jpg , . , , , , .
.jpg<script>
setInterval(function(){
var im1='http://mowmylawn.ru/webcam/webcam.jpg?s='+Math.random();
var im2='http://kosmos-podolsk.ru/webc1.jpg?s='+Math.random();
var tmpImg = new Image() ;
tmpImg.src = im1 ;
tmpImg.onload = function() {
$("#w1dd").attr('src',im1 );
} ;
tmpImg.src = im2 ;
tmpImg.onload = function() {
$("#w2dd").attr('src',im2 );
} ;
}, 200);
</script>
, :
Mysql 2 , /, . — users.
— ajax get , timestamp, ip .
( ) — timestamp. — timestamp , 60 …

ajax get , , «», 60 , , , «» .
, ... .
reddit.
mowmylawn.ru. — .
P.S.: ,
- KickBrick.
!UPD: , .
1) ~27 .
2), - wi-fi
3) - GT reddit 1000 , . — !
UPD: arduino . .
UPD: