wiki_page_gps_ex01
の編集
./?wiki_page_gps_ex01
[
トップ
] [
編集
|
差分
|
履歴
|
添付
|
リロード
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
-- 雛形とするページ --
adkArduino.ino
AutoTicketLinkName
basic
BracketName
ex0
ex1
ex2
ex3
ex4
FormattingRules
FrontPage
Help
Installing-Android-Application
InterWiki
InterWikiName
InterWikiSandBox
ladyMadonna
Menu
MenuBar
music
musicTest
musicTest0
NetDraw
pen
pen-ex1
PHP
Physical-Connection-1
pi_i2c_pico_neomatrix_ex01.ino
pi_i2c_pico_neomatrix_ex02.ino
PukiWiki
PukiWiki/1.4
PukiWiki/1.4/Manual
PukiWiki/1.4/Manual/Plugin
PukiWiki/1.4/Manual/Plugin/A-D
PukiWiki/1.4/Manual/Plugin/E-G
PukiWiki/1.4/Manual/Plugin/H-K
PukiWiki/1.4/Manual/Plugin/L-N
PukiWiki/1.4/Manual/Plugin/O-R
PukiWiki/1.4/Manual/Plugin/S-U
PukiWiki/1.4/Manual/Plugin/V-Z
Required-Hardware
Required-Software-and-Data
SandBox
simple example
tcp_server_ex1.py
Test-1
wearable_sign_01.py
wearable_sign_02.py
wearable_sign_03.py
wearable_sign_05.py
wearable_sign_06.py
WikiEngines
WikiName
WikiWikiWeb
wiki_bot_ex07.py
wiki_bot_ex08.py
wiki_bot_ex09.py
wiki_page_gps_ex01
Writing-Arduino-Firmware
YukiWiki
[[Required-Software-and-Data]] objectPage https://**************/**********/?wearable_sign_gps_01 or https://**************/**********/?wearable_sign_gps_01 device yamaRasPiDp9_1 or yamaRasPiDp9_2 start after no write for 10 min. command: set read_interval=45000 command: set exec_interval=0 command: set report_length=300 command: py ex1 'py: self.clear_report() py: # cmd=1 ... program py: # cmd=2 ... clear py: # cmd=3 ... shutdown py: # cmd=4 ... ip_address ... self.external("address eth0"), self.external("address wlan0"), self.external("address") ==self.external("address wlan0") py: # cmd=5 ... ls (list pictures, gif, ...) py: # cmd=18 . do nothing py: cmd=3 py: self.write_line('cmd='+str(cmd)) py: if cmd==1 : py: pos_info=[] py: px={'lat': 34.450790, 'lon': 133.261175, 'd_1': 50.0, 'm': "(blue)松永(yellow)あしあとスクェア(cyan)近く。" }; pos_info.append(px) py: px={'lat': 34.452834, 'lon': 133.257538, 'd_1': 100.0, 'm': "(red)JR(magenta)松永駅(cyan)近く。" }; pos_info.append(px) py: px={'lat': 34.449199, 'lon': 133.248675, 'd_1': 100.0, 'm': "(blue)松永(yellow)本郷川(cyan)末広橋(magenta)近く。" }; pos_info.append(px) py: px={'lat': 34.448303, 'lon': 133.244267, 'd_1': 200.0, 'm': "(blue)松永(yellow)今津(cyan)高諸神社(magenta)近く。" }; pos_info.append(px) py: px={'lat': 34.445537, 'lon': 133.240123, 'd_1': 200.0, 'm': "(blue)東尾道(yellow)藤井川(cyan)真川橋(magenta)近く。" }; pos_info.append(px) py: px={'lat': 34.441543, 'lon': 133.233194, 'd_1': 200.0, 'm': "(blue)東尾道(yellow)高須(cyan)八幡神社(magenta)近く。" }; pos_info.append(px) py: px={'lat': 34.435204, 'lon': 133.230298, 'd_1': 200.0, 'm': "(red)JR(magenta)東尾道駅(cyan)近く。" }; pos_info.append(px) py: px={'lat': 34.430642, 'lon': 133.229048, 'd_1': 200.0, 'm': "(blue)東尾道(yellow)尾道バイパス東口(cyan)交差点(magenta)近く。"}; pos_info.append(px) py: px={'lat': 34.415946, 'lon': 133.230080, 'd_1': 200.0, 'm': "(blue)尾道(yellow)山波(cyan)艮神社(magenta)近く。" }; pos_info.append(px) py: px={'lat': 34.410091, 'lon': 133.220179, 'd_1': 200.0, 'm': "(blue)尾道(yellow)山波(cyan)うずしお観光ビル廃墟(magenta)近く。"}; pos_info.append(px) py: px={'lat': 34.409580, 'lon': 133.216830, 'd_1': 200.0, 'm': "(blue)尾道(cyan)尾道大橋(magenta)近く。" }; pos_info.append(px) py: px={'lat': 34.404897, 'lon': 133.202978, 'd_1': 200.0, 'm': "(blue)向島(yellow)尾道渡船(cyan)向島(兼吉)のりば(magenta)近く。"};pos_info.append(px) py: px={'lat': 34.50843, 'lon': 133.67102, 'd_1': 100.0, 'm': "(green)ホタル荘(magenta)近く。"}; pos_info.append(px) py: date_org= self.Pico_Time.get_now() py: date=(date_org.split('.'))[0] py: #print(date) py: v2=self.external('show \" (magenta)'+date+' \"') py: time.sleep(15) py: lon=self.gps_lon py: lat=self.gps_lat py: for px in pos_info: py: lat2=px['lat']; lon2=px['lon']; d_1=px['d_1']; m=px['m'] py: d=self.geo_distance(lat,lon,lat2,lon2) py: print('lat=',lat,' lon=',lon,' lat2=',lat2,' lon2=',lon2,' d=',d, ' d_1=',d_1, ' m=',m) py: #v2=self.external('show \" (red)lat=(cyan)'+str(lat)+' (red)lon=(cyan)'+str(lon)+'\"') py: #time.sleep(60) py: mx="" py: if type(d) is not str: py: if d<d_1: py: mx=m py: v2=self.external('show \" '+mx+'\"') py: time.sleep(30) py: break py: if mx=="": py: #v2=self.external('show \" (red)着る(yellow)電光(green)掲示板(cyan)テスト中(white)! \"') py: #time.sleep(30) py: v2=self.external('show \" (green)松永(white)-(red)東尾道 (blue)走行実験(white)!\"') py: time.sleep(30) py: v2=self.external('address') py: time.sleep(1) py: print('cmd==1 end') py: if cmd==2 : py: print('clear') py: v1=self.external('clear') py: if cmd== 3 : py: v2=self.external('clear') py: time.sleep(1) py: self.write_line("shutdown.") py: self.send_result() py: time.sleep(10) py: v2=self.external("shutdown") py: time.sleep(1) py: if cmd== 4 : py: v1=self.external('clear') py: time.sleep(1) py: v2=self.external('address') py: time.sleep(1) py: if cmd== 5: py: print('ls') py: v1=self.external("ls") py: print('sleep(5)') py: time.sleep(5) py: if cmd == 7: py: #v2=self.external("text ") py: #time.sleep(10) py: #v2=self.external("show https://image.shutterstock.com/z/stock-vector-portrait-of-a-beautiful-girl-in-half-turn-young-blond-woman-avatar-for-social-networks-fashion-1643295139.jpg") py: #v2=self.external("show http://**************/**********/hei-chan-02.gif") py: #v2=self.external("show http://**************/**********/iciet2025.png") py: #v2=self.external("show http://**************/**********/IoT_Logo_01.png") py: v2=self.external("show http://**************/**********/theworldrosemeeting2025_logo_02.png") py: time.sleep(10) py: print('send_result()') py: self.send_result() py: print('python end') command: end ex1 command: run ex1 result: >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:04:52 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:05:53 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:15:23 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:16:21 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:17:20 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:18:21 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:19:20 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:22:11 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:23:09 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:24:08 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:25:07 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:27:02 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:28:01 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:29:04 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:30:08 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:31:08 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:32:07 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:33:05 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:34:04 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=3 >clear shutdown. current_device="yama_bot_0000_0000_0000_0001". Date=2025-06-08 17:35:04.343496 ---- #counter
タイムスタンプを変更しない
[[Required-Software-and-Data]] objectPage https://**************/**********/?wearable_sign_gps_01 or https://**************/**********/?wearable_sign_gps_01 device yamaRasPiDp9_1 or yamaRasPiDp9_2 start after no write for 10 min. command: set read_interval=45000 command: set exec_interval=0 command: set report_length=300 command: py ex1 'py: self.clear_report() py: # cmd=1 ... program py: # cmd=2 ... clear py: # cmd=3 ... shutdown py: # cmd=4 ... ip_address ... self.external("address eth0"), self.external("address wlan0"), self.external("address") ==self.external("address wlan0") py: # cmd=5 ... ls (list pictures, gif, ...) py: # cmd=18 . do nothing py: cmd=3 py: self.write_line('cmd='+str(cmd)) py: if cmd==1 : py: pos_info=[] py: px={'lat': 34.450790, 'lon': 133.261175, 'd_1': 50.0, 'm': "(blue)松永(yellow)あしあとスクェア(cyan)近く。" }; pos_info.append(px) py: px={'lat': 34.452834, 'lon': 133.257538, 'd_1': 100.0, 'm': "(red)JR(magenta)松永駅(cyan)近く。" }; pos_info.append(px) py: px={'lat': 34.449199, 'lon': 133.248675, 'd_1': 100.0, 'm': "(blue)松永(yellow)本郷川(cyan)末広橋(magenta)近く。" }; pos_info.append(px) py: px={'lat': 34.448303, 'lon': 133.244267, 'd_1': 200.0, 'm': "(blue)松永(yellow)今津(cyan)高諸神社(magenta)近く。" }; pos_info.append(px) py: px={'lat': 34.445537, 'lon': 133.240123, 'd_1': 200.0, 'm': "(blue)東尾道(yellow)藤井川(cyan)真川橋(magenta)近く。" }; pos_info.append(px) py: px={'lat': 34.441543, 'lon': 133.233194, 'd_1': 200.0, 'm': "(blue)東尾道(yellow)高須(cyan)八幡神社(magenta)近く。" }; pos_info.append(px) py: px={'lat': 34.435204, 'lon': 133.230298, 'd_1': 200.0, 'm': "(red)JR(magenta)東尾道駅(cyan)近く。" }; pos_info.append(px) py: px={'lat': 34.430642, 'lon': 133.229048, 'd_1': 200.0, 'm': "(blue)東尾道(yellow)尾道バイパス東口(cyan)交差点(magenta)近く。"}; pos_info.append(px) py: px={'lat': 34.415946, 'lon': 133.230080, 'd_1': 200.0, 'm': "(blue)尾道(yellow)山波(cyan)艮神社(magenta)近く。" }; pos_info.append(px) py: px={'lat': 34.410091, 'lon': 133.220179, 'd_1': 200.0, 'm': "(blue)尾道(yellow)山波(cyan)うずしお観光ビル廃墟(magenta)近く。"}; pos_info.append(px) py: px={'lat': 34.409580, 'lon': 133.216830, 'd_1': 200.0, 'm': "(blue)尾道(cyan)尾道大橋(magenta)近く。" }; pos_info.append(px) py: px={'lat': 34.404897, 'lon': 133.202978, 'd_1': 200.0, 'm': "(blue)向島(yellow)尾道渡船(cyan)向島(兼吉)のりば(magenta)近く。"};pos_info.append(px) py: px={'lat': 34.50843, 'lon': 133.67102, 'd_1': 100.0, 'm': "(green)ホタル荘(magenta)近く。"}; pos_info.append(px) py: date_org= self.Pico_Time.get_now() py: date=(date_org.split('.'))[0] py: #print(date) py: v2=self.external('show \" (magenta)'+date+' \"') py: time.sleep(15) py: lon=self.gps_lon py: lat=self.gps_lat py: for px in pos_info: py: lat2=px['lat']; lon2=px['lon']; d_1=px['d_1']; m=px['m'] py: d=self.geo_distance(lat,lon,lat2,lon2) py: print('lat=',lat,' lon=',lon,' lat2=',lat2,' lon2=',lon2,' d=',d, ' d_1=',d_1, ' m=',m) py: #v2=self.external('show \" (red)lat=(cyan)'+str(lat)+' (red)lon=(cyan)'+str(lon)+'\"') py: #time.sleep(60) py: mx="" py: if type(d) is not str: py: if d<d_1: py: mx=m py: v2=self.external('show \" '+mx+'\"') py: time.sleep(30) py: break py: if mx=="": py: #v2=self.external('show \" (red)着る(yellow)電光(green)掲示板(cyan)テスト中(white)! \"') py: #time.sleep(30) py: v2=self.external('show \" (green)松永(white)-(red)東尾道 (blue)走行実験(white)!\"') py: time.sleep(30) py: v2=self.external('address') py: time.sleep(1) py: print('cmd==1 end') py: if cmd==2 : py: print('clear') py: v1=self.external('clear') py: if cmd== 3 : py: v2=self.external('clear') py: time.sleep(1) py: self.write_line("shutdown.") py: self.send_result() py: time.sleep(10) py: v2=self.external("shutdown") py: time.sleep(1) py: if cmd== 4 : py: v1=self.external('clear') py: time.sleep(1) py: v2=self.external('address') py: time.sleep(1) py: if cmd== 5: py: print('ls') py: v1=self.external("ls") py: print('sleep(5)') py: time.sleep(5) py: if cmd == 7: py: #v2=self.external("text ") py: #time.sleep(10) py: #v2=self.external("show https://image.shutterstock.com/z/stock-vector-portrait-of-a-beautiful-girl-in-half-turn-young-blond-woman-avatar-for-social-networks-fashion-1643295139.jpg") py: #v2=self.external("show http://**************/**********/hei-chan-02.gif") py: #v2=self.external("show http://**************/**********/iciet2025.png") py: #v2=self.external("show http://**************/**********/IoT_Logo_01.png") py: v2=self.external("show http://**************/**********/theworldrosemeeting2025_logo_02.png") py: time.sleep(10) py: print('send_result()') py: self.send_result() py: print('python end') command: end ex1 command: run ex1 result: >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:04:52 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:05:53 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:15:23 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:16:21 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:17:20 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:18:21 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:19:20 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:22:11 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:23:09 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:24:08 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:25:07 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:27:02 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:28:01 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:29:04 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:30:08 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:31:08 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:32:07 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:33:05 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=1 >show " (magenta)2025-06-08 17:34:04 " >show " (green)松永(white)-(red)東尾道 (blue)走行実験(white)!" >address lo:127.0.0.1 wlan0:172.20.10.8 cmd=3 >clear shutdown. current_device="yama_bot_0000_0000_0000_0001". Date=2025-06-08 17:35:04.343496 ---- #counter
テキスト整形のルールを表示する