2693浏览
查看: 2693|回复: 6

[教程] 虚谷号入手配置指南

[复制链接]

虚谷号入手配置指南

虚谷号:创客板 2020-12-16固件

一、配置无线连接

1. U盘模式

通过OTG接口连接电脑,进入U盘模式

2. 配置无线

打开 vvBoard 文件夹下面的 vvBoard_config.ini ,配置无线连接:SSID=wifi名称,SSID_PSD=wifi密码

例如:

# set 1 to open and set 0 to close#
Jupyter=1
Siot=1
#wifi账号#
SSID=Tenda_2324
#wifi密码#
SSID_PSD=rb123456

保存并关闭 vvBoard_config.ini 文件,短按 reset 按钮

3. 查看ip地址

打开 vvBoard 文件夹下的 wifi_log.txt 文件,其中 wlan0 中的 inet地址:192.168.1.xxx 即为ip地址

二、操作系统更新

1. 通过SSH连接虚谷号

打开putty软件,输入虚谷号分配到的ip地址,用户名和密码均为 scope

2. 更新系统
scope@localhost:~$ sudo apt-get update
scope@localhost:~$ sudo apt-get upgrade
3. 更新pip
'''
先配置 pip 的清华源
再更新 pip
'''
scope@localhost:~$ pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
scope@localhost:~$ pip install --upgrade pip --user
4. 安装轻度编辑器

系统自带 vim ,轻度编辑需要可以安装 nano

scope@localhost:~$ sudo apt-get install nano
5. 安装浏览器

系统自带谷歌浏览器,觉着略卡,安装轻度浏览器 midori

scope@localhost:~$ sudo apt-get install midori
6. 关闭系统
scope@localhost:~$ sudo poweroff

三、 安装VNC软件

1. 安装远程连接所需软件
scope@localhost:~$ sudo apt-get install xrdp
# 注意到安装 xrdp 的时候会一并安装:
# vnc4server,xbase-clients
# 此时 vncserver 其实就一起安装好了
2. Win系统远程桌面
  • 打开 Windows 系统自带的 mstsc.exe 远程桌面程序,输入虚谷号分配到的ip地址,

    用户名和密码均为 scope ,便能进入远程连接的虚谷号操作系统

  • 如果远程桌面连接时,提示由于安全设置错误,客户端无法连接到远程计算机。

    需要禁止本地安全策略中的系统加密FIPS

  • 可按下面的教程进行设置:

    https://www.cnblogs.com/Braveliu/p/6759810.html

3.  VNC 文件设置
  • 设置VNC密码

    前面已经安装号了 vnc4server ,即VNC的服务端,终端里输入 vncserver ,会提示设置VNC密码,

    输入两遍密码,再根据提示输入 n ,便开启了一个VNC服务端口:

  • 结束掉开启的端口

    scope@localhost:~$ vncserver -kill :1    # 上图所示开启的端口号为1
  • 简单设置VNC配置文件

    如上图所示,VNC的配置文件位置为 /home/scope/.vnc/xstartup

    scope@localhost:~$ sudo nano /home/scope/.vnc/xstartup

    根据提示,去掉默认的 #

    CTRL+O 保存, CTRL+X 退出

4. VNC连接
  • 再次终端里运行vncserver ,开启VNC服务端,并分配到一个端口号

  • 电脑上打开VNC的客户端软件(此处用的是Tightvnc),输入虚谷号分配到的ip地址和VNC服务端开启的端口号

  • 输入之前设置的VNC密码

  • 出现熟悉的虚谷号系统的主界面

四、安装编程软件

1. 安装 Thonny
scope@localhost:~$ pip3 install thonny --user    
scope@localhost:~$ python3 -m thonny
2. 安装 mPythonX
scope@localhost:~$ cd /home/scope/Downloads
scope@localhost:~/Downloads$ wget http://static.steamaker.cn/files/mpythonx-0.5.1-arm64.tar.gz
scope@localhost:~/Downloads$ tar -zxvf mpythonx-0.5.1-arm64.tar.gz  # 解压压缩包

桌面远程连接虚谷号

进入mPythonX 的文件夹,右键点击在此处打开终端

输入 ./mpythonx.sh

稍等片刻,便看到熟悉的 mPythonX 程序界面

3. 安装 Remarkable
scope@localhost:~$ cd /home/scope/Downloads
scope@localhost:~/Downloads$ wget https://remarkableapp.github.io/files/remarkable_1.87_all.deb
scope@localhost:~/Downloads$ sudo dpkg -i remarkable_1.87_all.deb  # 安装 deb 安装包
scope@localhost:~/Downloads$ sudo apt install -f                   # 安装依赖包

4. 安装终端环境
scope@localhost:~$ sudo apt install screen
scope@localhost:~$ sudo pip install esptool  # 用于ESP系列芯片烧录固件
scope@localhost:~$ sudo pip install ampy
1. 设置端口号

虚谷号系统内置 Arduino IDE 编程软件,当编程控制板载标准的 Arduino 引脚时,端口需要选择 /dev/ttyS1

2. 设置中文显示环境

依次点击 File (文件) --> Preferences (首选项)

Settings (设置) --> Editor language (编辑器语言) --> 简体中文

3. 经典的 blink 程序
const byte led = 13;
void setup() {
    pinMode(led, OUTPUT);
}
void loop() {
    digitalWrite(led, HIGH);
    delay(1000);
    digitalWrite(led, LOW);
    delay(1000);
}

4. 跑马灯程序

```c++
const byte startPin = 8;
const byte endPin = 11;
byte lightPin = startPin;

void setup() {
for (byte i = startPin; i <= endPin; i++) {
pinMode(i, OUTPUT);
}
}

void loop() {
for (byte i = startPin; i <= endPin; i++) {
digitalWrite(i, LOW);
}

digitalWrite(lightPin, HIGH);

if (lightPin < endPin) {
    lightPin ++;
} else {
    lightPin = startPin;
}

delay(300);

}


![](data/attachment/album/202002/19/174230bpxxtponttnop81r.png)

```c++
const byte LEDs[] = {8, 9, 10, 11};
const byte total = sizeof(LEDs);
byte index = 0;

void setup() {
    for (byte i = 0; i < total; i++) {
        pinMode(LEDs[i], OUTPUT);
    }
}

void loop() {
    for (byte i = 0; i < total; i++) {
        digitalWrite(LEDs[i], LOW);
    }

    digitalWrite(LEDs[index], HIGH);
    index++;
    if (index == total) {
        index = 0;
    }
    delay(300);
}

gada888  版主

发表于 2020-2-21 16:37:36

不错不错
回复

使用道具 举报

mangbo  学徒

发表于 2020-4-5 18:32:53

你好 ,我想请问虚谷号在u盘模式连接wifi,填写了账号和密码,也短按reset键,但一直没有连wifi成功,wifi_log文档一直没有内容,怎么办?
回复

使用道具 举报

yywudao  高级技师
 楼主|

发表于 2020-4-6 15:25:32

mangbo 发表于 2020-4-5 18:32
你好 ,我想请问虚谷号在u盘模式连接wifi,填写了账号和密码,也短按reset键,但一直没有连wifi成功,wifi_ ...

刷虚谷最新的固件试试。或者检查下wifi名称是否有空格。之前的固件WIFI名称空格的话会出BUG连不上。
回复

使用道具 举报

mangbo  学徒

发表于 2020-4-6 15:35:03

yywudao 发表于 2020-4-6 15:25
刷虚谷最新的固件试试。或者检查下wifi名称是否有空格。之前的固件WIFI名称空格的话会出BUG连不上。 ...

昨天尝试到后面 wifi_log文档有内容了,但是文档里没有ip地址

202004066736..png
回复

使用道具 举报

mangbo  学徒

发表于 2020-4-6 15:40:19

我尝试用20191219_2+32版本去刷虚谷号创客版,但是一直没有检测到设备,我也就没刷成功,当我重新在audiuno文件夹中进行简单测试,短按reset键,本应消失的Blink.ino文件却还在,整得我有些懵。希望大家能帮我解解惑,谢谢!
回复

使用道具 举报

yywudao  高级技师
 楼主|

发表于 2020-4-7 19:04:09

mangbo 发表于 2020-4-6 15:40
我尝试用20191219_2+32版本去刷虚谷号创客版,但是一直没有检测到设备,我也就没刷成功,当我重新在audiuno ...

2+32的固件是教育版本的。创客版是1+8的固件。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

为本项目制作心愿单
购买心愿单
心愿单 编辑
[[wsData.name]]

硬件清单

  • [[d.name]]
btnicon
我也要做!
点击进入购买页面
上海智位机器人股份有限公司 沪ICP备09038501号-4

© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed

mail