1. 程式人生 > >Intel Edison開機自動載入Arduino程式碼

Intel Edison開機自動載入Arduino程式碼

there is a known issue with that version. The Arduino sketchesdon't start automatically after the board reboots. You could do oneof the following suggestions to solve it:

1.You can re-flash the Edison with the previous image which doesn'tpresent this issue. The previous image can be downloaded from thefollowing site: Intel Edison Software Release 2.1
2.The other suggestion would be the workaround described in thisthread: Run Arduino sketch on boot Workaround. With this workaroundyou will be able to keep using the latest yocto image.

如果不想降image可以按照下面的方法進行。開啟PuTTY,串列埠連線Edison。

若您第一次使用 init.d 啟動指令碼,必須首先建立目錄,之後跳至第 2 步:

第 1 步

 [email protected]:~# mkdir/etc/init.d

現在進入目錄,

第 2 步。

[email protected]:~# cd /etc/init.d


接下來,我們要在檔案中建立一個包含啟動命令的 bash 指令碼。 在本案例中,我們要對 Arduino sketch進行自動化處理,以便其在啟動時執行。

在任何情況下,開啟您的首選文字編輯器,建立指令碼 automateSketch.sh:

[email protected]:/etc/init.d# vi automateSketch.sh

將以下內容新增至該指令碼。

#!/bin/sh
exec /sketch/sketch.elf /dev/ttyGS0 /dev/ttyGS0

只需兩條指令,本教程就已接近尾聲。

現在我們用 chmod 更改許可,以便該指令碼成為可執行指令碼。

[email protected]:/etc/init.d# chmod +x/etc/init.d/automateSketch.sh
[email protected]:/etc/init.d# chmod +x automateSketch.sh

為確保 linux 每次啟動時都可以執行該指令碼,傳送以下命令,並等待返回,如下所示

[email protected]

:/etc/init.d# update-rc.d automateSketch.shdefaults
Adding system startup for /etc/init.d/automateSketch.sh

好的,完成了!我們來看看它是否可行!

[email protected]:/etc# reboot


現在,您可以看看 Arduino sketch 是否自動執行。

 

檢視全文

相關推薦

Intel Edison開機自動載入Arduino程式碼

there is a known issue with that version. The Arduino sketchesdon't start automatically after the board reboots. You could do oneof the f

Linux開機自動載入的幾種方法

linux 新增開機啟動項的三種方法。 (1)編輯檔案 /etc/rc.local 輸入命令:vim /etc/rc.local 將出現類似如下的文字片段: #!/bin/sh #This script will be executed after all the other init scripts

linux 下開機自動載入驅動模組

呼呼,好久不見 前一段時間開發了一個linux下的PCI資料採集板卡的驅動,在驅動除錯時,一直使用insmod 動態的載入驅動模組(ko檔案). 現在驅動基本開發結束,要提交給客戶,使用insmod載入時,對客戶來說不太好,比較麻煩,所以不能採用這種方法。由於 剛開始做驅

linux驅動模組開機自動載入,以及應用程式開機自啟動

第一種方法:相對來說簡單 將測試程式放在/bin底下,然後用vi編輯/etc/init.d/rcS,加上/bin/應用程式名 &,加上&表示後臺執行 這兩個功能的實現都是通過設定啟動指令碼來實現的。啟動指令碼的一般存放路徑是 /etc/init.d/rc

Intel Edison 換完Debian 後開機自動設定 Wifi

本人在韓國讀碩士 把上交的report 作為部落格記錄下來 希望能給大家做個參照 之前的wifi設定 請參照Intel Edison 換Debian 系統的博文      重啟的時候 自動設定 wifi 在 putty上 以 root的方式登入 edison nano/e

ubuntu mate 開機自動啟動ssh服務

開機自動啟動 css top con runlevel clas ubun files init 在文件/etc/init/ssh.conf中,有一句 start on filesystem or runlevel [2345] 如果想關閉自動啟動的話,把這一局修改為sta

php設計模式--命名空間與自動載入

使用 命令 說明 自動載入 str space () 就會 sta 關於命名空間:   最早的php是沒有命名空間的概念的,這樣不能存在相同名稱的類或者函數,當項目變大了之後,產生沖突的可能性就高了,代碼量也會變大,為了規劃,從php5.3開始對命名空間就支持了。 說明代碼

樹莓派開機自動發送IP到指定QQ郵箱

ima 郵箱 python代碼 檢查網絡 man 接口 get exception 我們 開啟QQ郵箱的smtp服務(自行百度) 獲取IP,發送IP的python代碼 Sudo nano send_ip.py Python代碼 //send_ip #!\usr\b

nginx 設置開機自動啟動腳本

nginx 設置開機自動啟動腳本Nginx 是一個很強大的高性能Web和反向代理服務器。雖然使用命令行可以對nginx進行各種操作,比如啟動等,但是還是根據不太方便。下面介紹在Linux下安裝後,如何設置開機自啟動。首先,在linux系統的/etc/init.d/目錄下創建nginx文件,使用如下命令:vim

設置 msyql php-fpm 開機自動啟動腳本

設置 msyql php-fpm 開機自動啟動腳本II 設置MySQL開機啟動1、將mysql安裝目錄下 support-files目錄下的mysql.server文件拷貝到/etc/init.d/目錄下並改名為mysqld,並更改權限chmod 775 /etc/init.d/mysqld2、設置開機啟動

Windows開機自動啟動VirtualBox(以無界面方式啟動)-虛擬機

自動 com blog 移動 pan color tar box 文件夾 windows 開機啟動 虛擬機 (以無界面方式啟動)桌面上出現了一個快捷方式, 右鍵快捷方式 -- 屬性, 在目標中添加 --type headless表示"無界面啟動" http://www.cn

利用.pbk來實現ADSL開機自動撥號

ras 利用 ros 提示 net 下載 name 實現 dial 當你新建撥號連接或者VPN連接之後在你的電腦裏會創建一個.pbk的文件 這個.pbk的文件可以說是一個集合,將你電腦的所有連接都保存在一起。 同時你還可以將此連接復制起來傳給其他人。 系統默認的.pbk的

Linux下Tomcat開機自動啟動

權限 esc ref 進程 chkconfig lin 自啟動腳本 lock cas linux下tomcat開機自動啟動有兩種方法,一種是簡單,一種是復雜而又專業的,使用shell腳本要實現,我們一般推薦shell腳本啟動方式。下面我們分別介紹這兩種方法。 1.shel

樹莓派設置開機自動運行Python程序

自動 程序 png mic 之前 raspbian sudo su 運行 -1 環境:樹莓派3B、最新RASPBIAN系統 方法: 切換到root賬戶  sudo su 修改rc.local文件  sudo nano /etc/rc.local 在ex

如何讓VMware Workstation 開機自動啟動虛擬機

vmware workstation首先,進入VMware Workstation的安裝目錄,一般為C:\Program Files (x86)\VMware\VMware Workstation在vmware.exe程序上點右鍵,發送快捷方式到桌面在桌面快捷方式上點右鍵,選屬性,在“目標位置”加入 -x "

NGINX、PHP-FPM開機自動啟動

comm ase scrip grep pri mod amp status -a 1、NGINX SHELL腳本 放到/etc/init.d/下取名nginx #!/bin/sh # # nginx - this script starts and stops

【AIX】AIX 開機自動掛載NFS共享

【aix】aix 開機自動掛載nfs共享AIX 開機自動掛載NFS共享當Oracle搭建在AIX系統上,進行集中備份時,可能需要通過連接Backup server掛載NFS共享來講數據備份到存儲設備上。在Linux環境下,如想實現NFS開機自動掛載,通常只要在/etc/fstab中添加相應記錄即可。在AIX系

linux centos7 redhat7 怎麽 如何設置開機自動進入命令行模式

tab nbsp 管理 fault targe 執行 默認 由於 ini   設置 centos7/redhat7 開機默認進入命令行模式 首先用 root 用戶打開配置文件 inittab,執行命令: vim /etc/inittab 由於 centos7 的 in

SVN服務器 Linux 開機自動啟動代碼

svn服務器 linux 開機自動啟動代碼 ~ ll /etc/rc.d/rc.local -rwxr-xr-x 1 root root 810 Oct 9 09:30 /etc/rc.d/rc.local ~ cat /etc/rc.d/rc.local #!/bin/bash # THI

Linux、UNIX設置開機自動運行命令、腳本配置

內容 自動 配置文件 ted under linux 鏈接 hp-ux ati 轉 http://blog.itpub.net/23135684/viewspace-668924/ unix 一般使用方法3,用於部署osw 方法一:編輯/etc/rc.d/rc.