把镜像写到eMMC

sudo apt-get install cifs-utils

首先将电脑ntfs影射到mnt

sudo mount -t cifs //192.168.1.106/MikuQ /mnt/

然后进行dd

sudo dd if=xxx.img of=/dev/mmcblk1 bs=10MB

等结果,没有进度条,心里好没底

57.png

dd好了?重起看看吧......启动成功,好神奇哇!

sudo mount -v -t cifs -o username="admin",password="!" //192.168.17.10/h /mnt/
sudo umonnt /mnt

参考文献:
https://bananapi.gitbooks.io/bpi-m2-/content/howtoburnlinuximagetoemmc.html
http://jingyan.baidu.com/article/b7001fe1694b800e7282dde4.html

SAMBA on BPI-M2+

首先安装

sudo apt-get install samba

修改配置

sudo nano /etc/samba/smb.conf

找到map to guest = bad user一行,在下边增加guest account = pi
结尾增加

[MikuQ]
comment = usb storage
path = /home/pi
browseable = Yes
read only = No
guest ok = Yes  
security = user

然后保存退出

sudo /etc/init.d/samba restart

然后就可以通过网上邻居访问到BPI啦

参考文献:http://forum.eepw.com.cn/thread/265663/1

附注,如果希望帐号登录,可以不添加guest account = pi和guest ok = Yes,然后通过sudo smbpasswd -a pi把已有的pi帐户设置给samba

BPI-M1+之PWM

QQ图片20160526211018.jpg
首先测试blink

#include <wiringPi.h>
//
// by MikuQ(i@mikuq.com) 2016-5-26
//
int main(void)
{
  wiringPiSetup() ;
  pinMode (7, OUTPUT) ;
  for(;;)
  {
    digitalWrite(7, HIGH) ; delay (500) ;
    digitalWrite(7,  LOW) ; delay (500) ;
  }
}

然后编译执行,没有问题

gcc -Wall -o pwm pwm.c -lwiringPi
sudo ./pwm

- 阅读剩余部分 -