mirror of
https://gitee.com/peng_zhihui/HoloCubic
synced 2025-11-04 21:19:40 +08:00
[Model] Add Steam-version-base model.
This commit is contained in:
parent
9cef12f649
commit
0e1cb1e9d1
@ -26,7 +26,7 @@ void setup()
|
|||||||
|
|
||||||
/*** Init screen ***/
|
/*** Init screen ***/
|
||||||
screen.init();
|
screen.init();
|
||||||
screen.setBackLight(0.2);
|
screen.setBackLight(0.8);
|
||||||
|
|
||||||
/*** Init IMU as input device ***/
|
/*** Init IMU as input device ***/
|
||||||
lv_port_indev_init();
|
lv_port_indev_init();
|
||||||
@ -34,7 +34,7 @@ void setup()
|
|||||||
|
|
||||||
/*** Init on-board RGB ***/
|
/*** Init on-board RGB ***/
|
||||||
rgb.init();
|
rgb.init();
|
||||||
rgb.setBrightness(0.1).setRGB(0, 122, 204);
|
rgb.setBrightness(0.1).setRGB(0, 0, 0);// (0, 122, 204);
|
||||||
|
|
||||||
/*** Init ambient-light sensor ***/
|
/*** Init ambient-light sensor ***/
|
||||||
ambLight.init(ONE_TIME_H_RESOLUTION_MODE);
|
ambLight.init(ONE_TIME_H_RESOLUTION_MODE);
|
||||||
@ -50,18 +50,16 @@ void setup()
|
|||||||
//tf.readBinFromSd("/ali.bin", (uint8_t*)screen_buffer.data);
|
//tf.readBinFromSd("/ali.bin", (uint8_t*)screen_buffer.data);
|
||||||
//tf.writeBinToSd("/ali.bin", (uint8_t*)screen_buffer.data + 64);
|
//tf.writeBinToSd("/ali.bin", (uint8_t*)screen_buffer.data + 64);
|
||||||
lv_holo_cubic_gui();
|
lv_holo_cubic_gui();
|
||||||
lv_scr_load_anim(scr2, LV_SCR_LOAD_ANIM_MOVE_LEFT, 500, 3000, false);
|
//lv_scr_load_anim(scr2, LV_SCR_LOAD_ANIM_FADE_ON, 300, 5000, false);
|
||||||
|
|
||||||
|
|
||||||
/*** Read WiFi info in SD-Card, then scan & connect WiFi ***/
|
/*** Read WiFi info in SD-Card, then scan & connect WiFi ***/
|
||||||
#if 0
|
#if 0
|
||||||
wifi.init(ssid, password);
|
wifi.init("ssid", "password");
|
||||||
|
|
||||||
Serial.println(wifi.getBilibiliFans("http://api.bilibili.com/x/relation/stat?vmid=20259914"));
|
Serial.println(wifi.getBilibiliFans("http://api.bilibili.com/x/relation/stat?vmid=20259914"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*tf.listDir("/", 0);
|
/*tf.listDir("/", 0);
|
||||||
tf.createDir("/mydir");
|
tf.createDir("/mydir");
|
||||||
tf.listDir("/", 0);
|
tf.listDir("/", 0);
|
||||||
@ -77,14 +75,17 @@ void setup()
|
|||||||
Serial.printf("Total space: %lluMB\n", SD.totalBytes() / (1024 * 1024));
|
Serial.printf("Total space: %lluMB\n", SD.totalBytes() / (1024 * 1024));
|
||||||
Serial.printf("Used space: %lluMB\n", SD.usedBytes() / (1024 * 1024));*/
|
Serial.printf("Used space: %lluMB\n", SD.usedBytes() / (1024 * 1024));*/
|
||||||
|
|
||||||
|
|
||||||
//Serial.println(sizeof(screen_buffer));
|
//Serial.println(sizeof(screen_buffer));
|
||||||
|
|
||||||
time1 = millis();
|
time1 = millis();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int flag = 0;
|
int flag = 0;
|
||||||
|
|
||||||
|
float fade = 0;
|
||||||
|
|
||||||
|
extern int tmp;
|
||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
// run this as often as possible ¡ý
|
// run this as often as possible ¡ý
|
||||||
@ -97,9 +98,62 @@ void loop()
|
|||||||
|
|
||||||
delay(10);
|
delay(10);
|
||||||
|
|
||||||
if (millis() - time1 > 6000 && !flag)
|
//if (Serial.available() > 0)
|
||||||
{
|
//{
|
||||||
flag = 1;
|
// char c = Serial.read();
|
||||||
lv_scr_load_anim(scr1, LV_SCR_LOAD_ANIM_MOVE_RIGHT, 500, 0, false);
|
// lv_scr_load_anim(scr2, LV_SCR_LOAD_ANIM_FADE_ON, 300, 500, false);
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
//if (tmp == 1)
|
||||||
|
//{
|
||||||
|
// lv_scr_load_anim(scr2, LV_SCR_LOAD_ANIM_MOVE_LEFT, 500, 500, false);
|
||||||
|
// tmp = 0;
|
||||||
|
//}
|
||||||
|
//if (tmp == 2)
|
||||||
|
//{
|
||||||
|
// lv_scr_load_anim(scr1, LV_SCR_LOAD_ANIM_MOVE_RIGHT, 500, 500, false);
|
||||||
|
// tmp = 0;
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
//if (millis() - time1 > 5000 && !flag)
|
||||||
|
//{
|
||||||
|
// flag = 1;
|
||||||
|
// //lv_scr_load_anim(scr1, LV_SCR_LOAD_ANIM_MOVE_RIGHT, 500, 0, false);
|
||||||
|
//lv_scr_load_anim(scr2, LV_SCR_LOAD_ANIM_NONE, 10, 0, false);
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
//if (millis() - time1 > 2000)
|
||||||
|
//{
|
||||||
|
// lv_label_set_text_fmt(label1, "CPU Temp: %d\%", (int)random(35, 50));
|
||||||
|
// lv_label_set_text_fmt(label2, "CPU Usage: %d\%", (int)random(20, 25));
|
||||||
|
// lv_label_set_text_fmt(label3, "Mem Usage: %dMB", 12538);
|
||||||
|
// lv_label_set_text_fmt(label4, "Net Upload: %dKB/s", (int)random(0, 100));
|
||||||
|
// lv_label_set_text_fmt(label5, "Net Download: %dKB/s", (int)random(35, 50));
|
||||||
|
|
||||||
|
// time1 = millis();
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
//while (true)
|
||||||
|
//{
|
||||||
|
// while (true)
|
||||||
|
// {
|
||||||
|
// if (fade < 1)
|
||||||
|
// {
|
||||||
|
// fade += 0.005;
|
||||||
|
// screen.setBackLight(fade);
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// break;
|
||||||
|
// delay(10);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// delay(5000);
|
||||||
|
// fade = 0;
|
||||||
|
// screen.setBackLight(fade);
|
||||||
|
// delay(5000);
|
||||||
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.30413.136
|
|||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HoloCubic_fw", "HoloCubic_fw.vcxproj", "{C5F80730-F44F-4478-BDAE-6634EFC2CA88}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HoloCubic_fw", "HoloCubic_fw.vcxproj", "{C5F80730-F44F-4478-BDAE-6634EFC2CA88}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mqtt_esp", "S:\DataCenter\WorkSpace\Arduino\My Examples\mqtt_esp\mqtt_esp.vcxproj", "{83B9F47E-F88D-4659-91C4-534CA3718586}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|x86 = Debug|x86
|
Debug|x86 = Debug|x86
|
||||||
@ -15,6 +17,10 @@ Global
|
|||||||
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.Build.0 = Debug|Win32
|
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.Build.0 = Debug|Win32
|
||||||
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.ActiveCfg = Release|Win32
|
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.ActiveCfg = Release|Win32
|
||||||
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.Build.0 = Release|Win32
|
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.Build.0 = Release|Win32
|
||||||
|
{83B9F47E-F88D-4659-91C4-534CA3718586}.Debug|x86.ActiveCfg = Debug|Win32
|
||||||
|
{83B9F47E-F88D-4659-91C4-534CA3718586}.Debug|x86.Build.0 = Debug|Win32
|
||||||
|
{83B9F47E-F88D-4659-91C4-534CA3718586}.Release|x86.ActiveCfg = Release|Win32
|
||||||
|
{83B9F47E-F88D-4659-91C4-534CA3718586}.Release|x86.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -8,6 +8,8 @@ void IMU::init()
|
|||||||
imu.initialize();
|
imu.initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int tmp = 0;
|
||||||
void IMU::update(int interval)
|
void IMU::update(int interval)
|
||||||
{
|
{
|
||||||
imu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);
|
imu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);
|
||||||
@ -25,11 +27,15 @@ void IMU::update(int interval)
|
|||||||
{
|
{
|
||||||
encoder_diff--;
|
encoder_diff--;
|
||||||
flag = 0;
|
flag = 0;
|
||||||
|
tmp = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (ay < -3000 && flag)
|
else if (ay < -3000 && flag)
|
||||||
{
|
{
|
||||||
encoder_diff++;
|
encoder_diff++;
|
||||||
flag = 0;
|
flag = 0;
|
||||||
|
|
||||||
|
tmp = 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,10 +3,16 @@
|
|||||||
*********************/
|
*********************/
|
||||||
#include "lv_cubic_gui.h"
|
#include "lv_cubic_gui.h"
|
||||||
#include "images.h"
|
#include "images.h"
|
||||||
|
|
||||||
|
|
||||||
lv_obj_t* scr1;
|
lv_obj_t* scr1;
|
||||||
lv_obj_t* scr2;
|
lv_obj_t* scr2;
|
||||||
|
|
||||||
|
lv_obj_t* label1;
|
||||||
|
lv_obj_t* label2;
|
||||||
|
lv_obj_t* label3;
|
||||||
|
lv_obj_t* label4;
|
||||||
|
lv_obj_t* label5;
|
||||||
|
|
||||||
void lv_holo_cubic_gui(void)
|
void lv_holo_cubic_gui(void)
|
||||||
{
|
{
|
||||||
@ -21,11 +27,35 @@ void lv_holo_cubic_gui(void)
|
|||||||
|
|
||||||
scr1 = lv_scr_act();
|
scr1 = lv_scr_act();
|
||||||
lv_obj_t* img1 = lv_img_create(lv_scr_act(), NULL);
|
lv_obj_t* img1 = lv_img_create(lv_scr_act(), NULL);
|
||||||
lv_img_set_src(img1, &ali);
|
lv_img_set_src(img1, &bilibili);
|
||||||
lv_obj_align(img1, NULL, LV_ALIGN_CENTER, 0, 0);
|
lv_obj_align(img1, NULL, LV_ALIGN_CENTER, 0, 0);
|
||||||
|
|
||||||
scr2 = lv_obj_create(NULL, NULL);
|
scr2 = lv_obj_create(NULL, NULL);
|
||||||
lv_obj_t* img2 = lv_img_create(scr2, NULL);
|
lv_obj_t* img2 = lv_img_create(scr2, NULL);
|
||||||
lv_img_set_src(img2, &cat);
|
lv_img_set_src(img2, &bdgw);
|
||||||
lv_obj_align(img2, NULL, LV_ALIGN_CENTER, 0, 0);
|
lv_obj_align(img2, NULL, LV_ALIGN_CENTER, 0, 0);
|
||||||
|
|
||||||
|
|
||||||
|
//label1 = lv_label_create(scr1, NULL);
|
||||||
|
//lv_label_set_text_fmt(label1, "CPU Temp: %d C", 0);
|
||||||
|
//lv_obj_set_pos(label1, 20, 30);
|
||||||
|
|
||||||
|
//label2 = lv_label_create(scr1, NULL);
|
||||||
|
//lv_label_set_text_fmt(label2, "CPU Usage: %d\%", 0);
|
||||||
|
//lv_obj_set_pos(label2, 20, 45);
|
||||||
|
|
||||||
|
//label3 = lv_label_create(scr1, NULL);
|
||||||
|
//lv_label_set_text_fmt(label3, "Mem Usage: %dMB", 0);
|
||||||
|
//lv_obj_set_pos(label3, 20, 60);
|
||||||
|
|
||||||
|
//label4 = lv_label_create(scr1, NULL);
|
||||||
|
//lv_label_set_text_fmt(label4, "Net Upload: %dKB/s", 0);
|
||||||
|
//lv_obj_set_pos(label4, 20, 75);
|
||||||
|
|
||||||
|
//label5 = lv_label_create(scr1, NULL);
|
||||||
|
//lv_label_set_text_fmt(label5, "Net Download: %dKB/s", 0);
|
||||||
|
//lv_obj_set_pos(label5, 20, 90);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -12,8 +12,11 @@ extern "C" {
|
|||||||
|
|
||||||
extern lv_obj_t* scr1;
|
extern lv_obj_t* scr1;
|
||||||
extern lv_obj_t* scr2;
|
extern lv_obj_t* scr2;
|
||||||
|
extern lv_obj_t* label1;
|
||||||
|
extern lv_obj_t* label2;
|
||||||
|
extern lv_obj_t* label3;
|
||||||
|
extern lv_obj_t* label4;
|
||||||
|
extern lv_obj_t* label5;
|
||||||
void lv_holo_cubic_gui(void);
|
void lv_holo_cubic_gui(void);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
4.3D Model/Naive Version/holocubic.jpg
Normal file
BIN
4.3D Model/Naive Version/holocubic.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 464 KiB |
BIN
4.3D Model/Steam Version/HoloCubic v11.1.3dm
Normal file
BIN
4.3D Model/Steam Version/HoloCubic v11.1.3dm
Normal file
Binary file not shown.
BIN
4.3D Model/Steam Version/HoloCubic v11.1.3dmbak
Normal file
BIN
4.3D Model/Steam Version/HoloCubic v11.1.3dmbak
Normal file
Binary file not shown.
BIN
4.3D Model/holocubic1.jpg
Normal file
BIN
4.3D Model/holocubic1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 433 KiB |
BIN
4.3D Model/holocubic2.jpg
Normal file
BIN
4.3D Model/holocubic2.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 388 KiB |
BIN
4.3D Model/holocubic3.jpg
Normal file
BIN
4.3D Model/holocubic3.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 268 KiB |
BIN
4.3D Model/render.ksp
Normal file
BIN
4.3D Model/render.ksp
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user