【前言】
感谢eeworld与泰坦触觉给予这次DIY的机会。虽然开发板收到了好多天了,但是一直在资料收集与学习之中。
【官方资料】
在官方网站titanhaptics.com,需要注册一下登录,才可以下载到开发资料。
在软件下载页面Software - TITAN Haptics,可以有下载软件的链接:
在软件下载页面我首先下载到了快速入门指南的文档:
再在下面,可以下载到基础库,按照快速开始,我将他的三个基础库解压到文档下面的arduino/libraries目录下面:
【开发方式】
开发方式有两种方式可以选择:
1、是Arduino,在入门指南中有详细的说明:
首先需要安装esp32的支持库,安装好后,选择ESP32 PICO-D4开发板:
【示例下载】
在软件下载的页中,有例子下载的链接:
下载好后,有丰富的示例:
【遇到的问题】
官方的快速入门指南中,指出需要用2.05的库来开发,但是我下载了好久都没有下载完成,但是用最新的3.07很快就可以下载好。但是编译时报错:
In file included from c:\Users\liujianhua\Documents\Arduino\libraries\VHBoard\src/VHBoard.h:3,
from c:\Users\liujianhua\Documents\Arduino\libraries\VHBoard\src/Esp32PicoMini.h:2,
from D:\VHExamples\VHExamples\examples\VHChannels\examples\VH_multi_channel_effects\VH_multi_channel_effects.ino:6:
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/datastructure.h:113:14: error: 'string' in namespace 'std' does not name a type
113 | std::string WIFI_PASSWORD="1234567890"; /*!< Wifi password.Default value is 1234567890 */
| ^~~~~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/datastructure.h:1:1: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
+++ |+#include <string>
1 | #pragma once
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/datastructure.h: In constructor 'DeviceSettings::DeviceSettings(DeviceSettings*)':
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/datastructure.h:153:35: error: 'struct WIFI_SETTINGS' has no member named 'WIFI_PASSWORD'
153 | m_objWifiSettings.WIFI_PASSWORD=p->GetWifiSettings()->WIFI_PASSWORD;
| ^~~~~~~~~~~~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/datastructure.h:153:71: error: 'struct WIFI_SETTINGS' has no member named 'WIFI_PASSWORD'
153 | m_objWifiSettings.WIFI_PASSWORD=p->GetWifiSettings()->WIFI_PASSWORD;
| ^~~~~~~~~~~~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/datastructure.h: In member function 'void DeviceSettings::setWifiPassWord(const char*)':
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/datastructure.h:183:35: error: 'struct WIFI_SETTINGS' has no member named 'WIFI_PASSWORD'
183 | m_objWifiSettings.WIFI_PASSWORD=passWord;
| ^~~~~~~~~~~~~
In file included from c:\Users\liujianhua\Documents\Arduino\libraries\VHBoard\src/VHBoard.h:4:
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h: At global scope:
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:17:12: error: 'string' in namespace 'std' does not name a type
17 | const std::string PREMITIVE_NAME[PREMITIVE_COUNT] =
| ^~~~~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:5:1: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
4 | #include <II2SoundBus.h>
+++ |+#include <string>
5 |
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:25:10: error: 'string' in namespace 'std' does not name a type
25 | std::string m_strKey;
| ^~~~~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:25:5: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
25 | std::string m_strKey;
| ^~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:26:10: error: 'string' in namespace 'std' does not name a type
26 | std::string m_strValue;
| ^~~~~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:26:5: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
26 | std::string m_strValue;
| ^~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:55:10: error: 'string' in namespace 'std' does not name a type
55 | std::string Key()
| ^~~~~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:55:5: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
55 | std::string Key()
| ^~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:64:10: error: 'string' in namespace 'std' does not name a type
64 | std::string Value()
| ^~~~~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:64:5: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
64 | std::string Value()
| ^~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:73:10: error: 'string' in namespace 'std' does not name a type
73 | std::string toString()
| ^~~~~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:73:5: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
73 | std::string toString()
| ^~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h: In constructor 'AdditionalInfo::AdditionalInfo(const char*, const char*)':
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:36:9: error: 'm_strKey' was not declared in this scope
36 | m_strKey = key;
| ^~~~~~~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:37:9: error: 'm_strValue' was not declared in this scope
37 | m_strValue = value;
| ^~~~~~~~~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h: In constructor 'AdditionalInfo::AdditionalInfo(AdditionalInfo*)':
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:47:9: error: 'm_strKey' was not declared in this scope
47 | m_strKey = p->Key();
| ^~~~~~~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:47:23: error: 'class AdditionalInfo' has no member named 'Key'
47 | m_strKey = p->Key();
| ^~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:48:9: error: 'm_strValue' was not declared in this scope
48 | m_strValue = p->Value();
| ^~~~~~~~~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:48:25: error: 'class AdditionalInfo' has no member named 'Value'
48 | m_strValue = p->Value();
| ^~~~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h: At global scope:
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:96:10: error: 'string' in namespace 'std' does not name a type
96 | std::string *m_arrayChnlDesc;
| ^~~~~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:96:5: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
96 | std::string *m_arrayChnlDesc;
| ^~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:100:10: error: 'string' in namespace 'std' does not name a type
100 | std::string m_strPinDesc;
| ^~~~~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:100:5: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
100 | std::string m_strPinDesc;
| ^~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:276:25: error: 'std::string' has not been declared
276 | void setChannelDesc(std::string *list, int size);
| ^~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:314:10: error: 'string' in namespace 'std' does not name a type
314 | std::string *GetChannelDesc() { return m_arrayChnlDesc; }
| ^~~~~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:314:5: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
314 | std::string *GetChannelDesc() { return m_arrayChnlDesc; }
| ^~~
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h: In member function 'void VHChannel::setPinDesc(const char*)':
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:326:41: error: 'm_strPinDesc' was not declared in this scope; did you mean 'setPinDesc'?
326 | void setPinDesc(const char *desc) { m_strPinDesc = desc; }
| ^~~~~~~~~~~~
| setPinDesc
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h: In member function 'const char* VHChannel::getPinDesc()':
c:\Users\liujianhua\Documents\Arduino\libraries\VHCommUtils\src/VHChannel.h:332:39: error: 'm_strPinDesc' was not declared in this scope; did you mean 'setPinDesc'?
332 | const char *getPinDesc() { return m_strPinDesc.c_str(); }
| ^~~~~~~~~~~~
| setPinDesc
exit status 1
Compilation error: exit status 1
根据出错信息调整了好些时间还没有搞好。
估计是库不兼容的问题,待后慢慢查找解决。