晕哥 说:make menuconfig
[ ] Image configuration ---> Separate feed repositories ---> [ * ] Enable feed luci
LuCI --->看看这里有没有你想要的?
https://github.com/openwrt/luci
要这样才行哦:
./scripts/feeds update luci
./scripts/feeds install -a -p luci
非常感谢,
sysupgrade openwrt-ramips-mt7688-Widora-squashfs-sysupgrade.bin
这样可以了,终于看到了网页界面.
另外这个也不错:
https://github.com/kodera2t/ESP32_OLED_LAN8720_sample
Sample code for "ESP32 Monster board" with LAN8720 and SH1106 OLED display details can be found at https://www.tindie.com/products/microwavemont/esp32-monster-board-ether-can-oled-all-in-one/
串口数据读取示例:
1、获取Pack模拟量
读取:7E 31 39 30 31 34 36 34 32 46 30 30 31 30 31 46 44 32 44 0D
返回:7E 31 39 30 31 34 36 30 30 42 30 32 33 30 38 30 42 43 38 30 42 43 30 30 42 43 30 30 42 43 31 30 42 43 30 30 42 42 42 30 42 42 44 30 42 43 30 30 32 30 43 42 33 30 42 46 46 30 30 30 30 35 45 37 34 30 31 36 38 30 33 30 31 36 38 30 30 30 30 30 37 44 30 45 45 34 45 0D
2、获取Pack告警量
读取:7E 31 39 30 31 34 36 34 34 46 30 30 31 30 31 46 44 32 42 0D
返回:7E 31 39 30 31 34 36 30 30 37 30 31 38 30 32 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 32 30 32 30 30 30 31 30 30 30 30 30 30 33 33 30 36 33 30 30 30 30 30 30 30 30 30 35 31 46 34 37 46 0D
3、获取设备地址
读取:7E 31 39 30 31 34 36 35 30 46 30 30 31 30 31 46 44 32 45 0D
返回:7E 31 39 30 31 34 36 30 30 46 30 30 31 30 31 46 44 33 33 0D
4、读取厂商信息
读取:7E 31 39 30 31 34 36 35 31 46 30 30 31 30 31 46 44 32 44 0D
返回:7E 31 39 30 31 34 36 30 30 43 30 30 34 73 7A 6D 74 46 42 43 36 0D
5、获取PACK数量
读取:7E 31 39 30 31 34 36 39 30 46 30 30 31 30 31 46 44 32 41 0D
返回:7E 31 39 30 31 34 36 30 30 46 30 30 31 30 31 46 44 33 33 0D
6、充电MOS关闭
读取:7E 31 39 30 31 34 36 39 41 46 30 30 31 30 31 46 44 31 39 0D
返回:7E 31 39 30 31 34 36 30 30 46 30 30 31 30 30 46 44 33 34 0D
7、充电MOS打开
读取:7E 31 39 30 31 34 36 39 41 46 30 30 31 30 30 46 44 31 41 0D
返回:7E 31 39 30 31 34 36 30 32 46 30 30 31 30 30 46 44 33 32 0D
8、放电MOS关闭
读取:7E 31 39 30 31 34 36 39 42 46 30 30 31 30 31 46 44 31 38 0D
返回:7E 31 39 30 31 34 36 30 30 46 30 30 31 30 30 46 44 33 34 0D
9、放电MOS打开
读取:7E 31 39 30 31 34 36 39 42 46 30 30 31 30 30 46 44 31 39 0D
返回:7E 31 39 30 31 34 36 30 30 46 30 30 31 30 30 46 44 33 34 0D
不明白协议为何要用7E开头
我也刚做完,确实要左移!
陆闻天 说:晕哥 说:https://whycan.cn/files/201710/13/20171013113805.png
果然是啊, 谢谢陆大神, 喝水不忘挖坑人。
晚上回家试一试.别客气, 那是因为我刚刚做完RC522项目
别人挖的坑,含泪也要填上,不知道为什么nxp要这么弄
陆闻天 说:晕哥 说:昨晚测试一会, 没读出寄存器值, 真想去撞南墙...
RC522读寄存器,貌似要左移,不能直接写寄存器地址, 你看下手册
https://whycan.cn/files/201710/13/20171013113805.png
果然是啊, 谢谢陆大神, 喝水不忘挖坑人。
晚上回家试一试.
别客气, 那是因为我刚刚做完RC522项目
uint8_t PCD_ReadRegister(spi_device_handle_t spi, uint8_t reg)
{
uint8_t value;
esp_err_t ret;
spi_transaction_t t;
memset(&t, 0, sizeof(t)); //Zero out the transaction
reg = 0x80 | reg;
t.length=8; //Command is 8 bits
t.tx_buffer=® //The data is the cmd itself
t.user=(void*)0; //D/C needs to be set to 0
ret=spi_device_transmit(spi, &t); //Transmit!
uint8_t zero = 0;
uint8_t kkk = 0;
t.tx_buffer = &zero;
t.rx_buffer = &kkk;
t.length=8*1;
t.flags = SPI_TRANS_USE_RXDATA;
ret = spi_device_transmit(spi, &t);
assert( ret == ESP_OK );
return *(uint8_t*)t.rx_data;;
}昨晚测试一会, 没读出寄存器值, 真想去撞南墙...
RC522读寄存器,貌似要左移,不能直接写寄存器地址, 你看下手册