・市場価値を高めるとは「タグ付け」をすること・「タグ」を掛け合わせて、その掛け合わせの中の希少性を知ること
2021年7月24日土曜日
転職2.0
2021年6月25日金曜日
無念。。システムアーキテクト
2021年6月23日水曜日
<備忘録>Fire HD8 Plus
Fire HD8 Plusは第10世代(2020年モデル)。7インチと比較してもそこまでゴツくない。本体容量は32GBのため十分かな(今までは8GBで結構ヤバかった)。マイクロSDで外部にも逃がせるんで、まぁ大丈夫でしょう。
さてじっくり育てますか。
・fireタブレットの見分け方
2021年5月29日土曜日
<備忘録>CTU:ムクドリ追払いマシーン
pi@raspberrypi:~ $ nano event_start.sh
GNU nano 3.2 event_start.sh
#!/bin/bash
#本シェルスクリプトの置いてあるディレクトリに移動(pythonがはくlogが適切に吐き出されるように。)
cd $(dirname $0)
#トークンを記述
token="xxxご自身のtokenを記載xxx"
#LINEにメッセージを送信
curl -X POST -H "Authorization: Bearer ${token}" -F "message = ラズパイからのメッセージstart" https://notify-api.line.me/api/notify
#ドローンを動かす。result.txtに直近実行のlogを吐けるようにしとく。
python /home/pi/Tello-Python/Single_Tello_Test/tello_test.py /home/pi/Tello-Python/Single_Tello_Test/flight_test2.txt 2>&1 | tee /home/pi/result.txt
#motionを一時停止。暴走しないように。後述。
curl http://localhost:8080/0/detection/pause
pi@raspberrypi:~ $ chmod +x event_start.sh
pi@raspberrypi:~ $ nano event_end.sh
GNU nano 3.2 event_end.sh
#!/bin/bash
#トークンを記述
token="xxxご自身のtokenを記載xxx"
#LINEにメッセージを送信
curl -X POST -H "Authorization: Bearer ${token}" -F "message = ラズパイからのメッセージend" https://notify-api.line.me/api/notify
pi@raspberrypi:~ $ chmod +x event_end.sh
pi@raspberrypi:~ $ sudo nano /etc/motion/motion.conf
GNU nano 3.2 /etc/motion/motion.conf
# %v = event, %q = frame number, %t = camera id number,
# %D = changed pixels, %N = noise level,
# %i and %J = width and height of motion area,
# %K and %L = X and Y coordinates of motion center
# %C = value defined by text_event
# %f = filename with full path
# %n = number indicating filetype
# Both %f and %n are only defined for on_picture_save,
# on_movie_start and on_movie_end
# Quotation marks round string are allowed.
############################################################
# Do not sound beeps when detecting motion (default: on)
# Note: Motion never beeps when running in daemon mode.
quiet on
# Command to be executed when an event starts. (default: none)
# An event starts at first motion detected after a period of no motion defined by event_gap
#; on_event_start value
on_event_start /home/pi/event_start.sh
# Command to be executed when an event ends after a period of no motion
# (default: none). The period of no motion is defined by option event_gap.
#; on_event_end value
on_event_end /home/pi/event_end.sh
# Command to be executed when a picture (.ppm|.jpg) is saved (default: none)
# To give the filename as an argument to a command append it with %f
; on_picture_save value
pi@raspberrypi:~ $ mkdir log
pi@raspberrypi:~ $ sudo motion
pi@raspberrypi:~ $ cat result.txt
id: 0
command: command
response: ok
start time: 2021-05-29 13:08:52.257217
end_time: 2021-05-29 13:08:52.315474
duration: 0.058257
id: 1
command: takeoff
response: ok
start time: 2021-05-29 13:08:52.315591
end_time: 2021-05-29 13:08:57.701102
duration: 5.385511
id: 2
command: flip b
response: ok
start time: 2021-05-29 13:08:59.703400
end_time: 2021-05-29 13:09:03.325487
duration: 3.622087
id: 3
command: flip f
response: ok
start time: 2021-05-29 13:09:05.327844
end_time: 2021-05-29 13:09:08.921326
duration: 3.593482
id: 4
command: flip l
response: ok
start time: 2021-05-29 13:09:10.923559
end_time: 2021-05-29 13:09:14.479949
duration: 3.55639
id: 5
command: flip r
response: ok
start time: 2021-05-29 13:09:16.482158
end_time: 2021-05-29 13:09:20.089971
duration: 3.607813
id: 6
command: land
response: ok
start time: 2021-05-29 13:09:22.092242
end_time: 2021-05-29 13:09:25.904518
duration: 3.812276
pi@raspberrypi:~/log $ ls
'2021-05-23 16:42:56.109620.txt' '2021-05-23 18:13:02.157302.txt'
'2021-05-23 17:30:33.422215.txt' '2021-05-23 18:13:52.863802.txt'
'2021-05-23 17:55:20.817894.txt' '2021-05-23 18:14:50.656453.txt'
'2021-05-23 17:58:11.359075.txt' '2021-05-29 13:07:00.454953.txt'
'2021-05-23 17:59:02.850064.txt' '2021-05-29 13:08:52.256574.txt'
'2021-05-23 17:59:53.879250.txt' '2021-05-30 12:15:42.879107.txt'
'2021-05-23 18:11:40.650572.txt'
pi@raspberrypi:~ $ curl http://localhost:8080/0/detection/pause #motion一時停止
pi@raspberrypi:~ $ curl http://localhost:8080/0/detection/start #motion再開
2021年5月23日日曜日
<備忘録>プロペラガードを装着
2021年5月9日日曜日
<備忘録>飛行計画通りにドローンが動くようになった。
GNU nano 3.2 tello.py
import socket
import threading
import time
from stats import Stats
class Tello:
def __init__(self):
self.local_ip = ''
self.local_port = 8889
self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # socke$
self.socket.bind((self.local_ip, self.local_port))
# thread for receiving cmd ack
self.receive_thread = threading.Thread(target=self._receive_thread)
self.receive_thread.daemon = True
self.receive_thread.start()
# self.tello_ip = '192.168.10.1' #Tello EDUのデフォルトのIPはコメントアウトしておく。
self.tello_ip = '192.168.xx.cc' #ここをTello EDUに振られたIPアドレスにしておく。
self.tello_port = 8889
self.tello_adderss = (self.tello_ip, self.tello_port)
self.log = []
self.MAX_TIME_OUT = 15.0
GNU nano 3.2 command.txt
command
takeoff
delay 5
land
GNU nano 3.2 command2.txt
command
takeoff
delay 2
land
GNU nano 3.2 flight_test.txt
command
takeoff
delay 2
left 20
delay 2
back 20
delay 2
right 20
delay 2
forward 20
delay 2
land
GNU nano 3.2 flight_test2.txt
command
takeoff
delay 2
flip b
delay 2
flip f
delay 2
flip l
delay 2
flip r
delay 2
land
GNU nano 3.2 flight_test3.txt 変更済み
command
takeoff
delay 2
up 50
delay 2
cw 360
delay 2
down 50
delay 2
ccw 360
delay 2
land
pi@raspberrypi:~/Tello-Python/Single_Tello_Test $ python tello_test.py command.txt
(詳細割愛)
pi@raspberrypi:~/Tello-Python/Single_Tello_Test $ python tello_test.py command2.txt
pi@raspberrypi:~/Tello-Python/Single_Tello_Test $ python tello_test.py flight_test.txt
pi@raspberrypi:~/Tello-Python/Single_Tello_Test $ python tello_test.py flight_test2.txt
pi@raspberrypi:~/Tello-Python/Single_Tello_Test $ python tello_test.py flight_test3.txt
pi@raspberrypi:~/Tello-Python/Single_Tello_Test $ python tello_test.py command2.txt
Traceback (most recent call last):
File "tello_test.py", line 13, in <module>
tello = Tello()
File "/home/pi/Tello-Python/Single_Tello_Test/tello.py", line 11, in __init__
self.socket.bind((self.local_ip, self.local_port))
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use
pi@raspberrypi:~/Tello-Python/Single_Tello_Test $ ps -fA | grep python
pi 685 1 0 5月02 ? 00:00:00 /usr/bin/python3 /usr/share/system-config-printer/applet.py
pi 20201 20030 14 16:33 pts/0 00:00:33 python tello_test.py command2.txt
pi 20259 20030 0 16:36 pts/0 00:00:00 grep --color=auto python
pi@raspberrypi:~/Tello-Python/Single_Tello_Test $ sudo lsof -i:8889
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
python 20201 pi 4u IPv4 469376 0t0 UDP *:8889
pi@raspberrypi:~/Tello-Python/Single_Tello_Test $
pi@raspberrypi:~/Tello-Python/Single_Tello_Test $ kill -9 20201
pi@raspberrypi:~/Tello-Python/Single_Tello_Test $ ps -fA | grep python
pi 685 1 0 5月02 ? 00:00:00 /usr/bin/python3 /usr/share/system-config-printer/applet.py
pi 20268 20030 0 16:38 pts/0 00:00:00 grep --color=auto python
pi@raspberrypi:~/Tello-Python/Single_Tello_Test $
pi@raspberrypi:~/Tello-Python/Single_Tello_Test $ sudo lsof -i:8889
[1]+ 強制終了 python tello_test.py command2.txt
-
ここ2週間でコツコツと整備してきたおうちネットワークの最終形態として、ソフトバンク光でレンタルしているBBユニットを最新機種に交換してみました。 2015年から5年 使い続けているのが E-WMTA2.2 という機種。 参考サイト(※1) によると、 無料 で最新の E-WMTA...
-
半年に1回の脳トレ。情報処理試験 #システムアーキテクト の5回目。結論から言おう、 超絶自信あり! 俺のドラゴンボール集めも残1のラスボス戦。そして未だかつて午後1を突破できていない残念な状況。 前回は午後1(56点) 、 前々回は午後1(39点) 、 前々々回は午後1(51点...
-
情報処理技術者試験の高度完全制覇(9冠)した ので、記録を残してみることとする。 #情報処理試験 高度9個ゲットしました(下図 紫枠 )。(出典:IPA 試験区分一覧 ) 証書を額に入れて並べて唱えてみました。神龍は出てきませんでした。 丸く並べ替えましたが、やはり神...







