Project

General

Profile

Wiki » History » Version 28

Frédéric Blanc, 2023-09-12 10:01

1 1 Frédéric Blanc
h1. Console KSAP6
2
3 23 Frédéric Blanc
!clipboard-202302241523-zbl4w.png!
4
5 21 Frédéric Blanc
h2. alim
6
7
!clipboard-202202011044-x1env.png!
8 17 Frédéric Blanc
9
h2. ftdi
10
11
!clipboard-202201281040-91geb.png!
12
13 16 Frédéric Blanc
h2. generic grbl message parser
14
15
https://github.com/jschoch/grbl_chat
16
17 1 Frédéric Blanc
h2. écran
18
19 2 Frédéric Blanc
!clipboard-202201141529-a0x50.png!
20
NEXTION NX8048P070-011R
21
22
https://nextion.tech/datasheets/nx8048p070-011r/
23
24 9 Frédéric Blanc
h3. Communication
25
26
GPIO9 	UART_DEV(1):TxD  SD2 (17)
27 13 Frédéric Blanc
GPIO10 	UART_DEV(1):RxD  SD3 (18) (ne fonctionne pas
28
29
Serial1.begin(9600, SERIAL_8N1 , 4, 2); 
30
RxD GPIO4
31
TxD GPIO2
32
33
remapé le port serial1
34
35 9 Frédéric Blanc
36 10 Frédéric Blanc
Serial Port Baudrate 9600
37
38 14 Frédéric Blanc
39
dans la lib ITEADLIB_Arduino_Nextion fichier NexConfig.h ligne 34
40
<pre><code class="cpp">
41
...
42
/**
43
 * Define nexSerial for communicate with Nextion touch panel. 
44
 */
45
#define nexSerial Serial1
46
#define NEXRXPIN 4
47
#define NEXTXPIN 2
48
...
49
</code></pre>
50
51 15 Frédéric Blanc
h4. timer
52
53
https://projetsdiy.fr/esp32-timers-alarmes-code-arduino/
54 14 Frédéric Blanc
55 11 Frédéric Blanc
h3. Lib
56
57
https://github.com/itead/ITEADLIB_Arduino_Nextion/archive/master.zip
58
59 12 Frédéric Blanc
https://randomnerdtutorials.com/nextion-display-with-arduino-getting-started/
60
61 1 Frédéric Blanc
h2. joystick
62 3 Frédéric Blanc
63 27 Frédéric Blanc
!clipboard-202303221601-xbntj.png!
64 5 Frédéric Blanc
65 27 Frédéric Blanc
h3. HOME
66
67
!clipboard-202303221558-hqyob.png!
68 7 Frédéric Blanc
69 20 Frédéric Blanc
70
h3. mode JOG
71
72
https://github.com/gnea/grbl/blob/master/doc/markdown/jogging.md
73
74 7 Frédéric Blanc
h2. CPU
75
76
!clipboard-202201181534-mvjil.png!
77
ESP32-WROOM-32D
78
https://www.mouser.fr/ProductDetail/Espressif-Systems/ESP32-WROOM-32DM113DH2800PH3Q0
79 8 Frédéric Blanc
80 26 Frédéric Blanc
81
variable en flash
82
https://randomnerdtutorials.com/esp32-save-data-permanently-preferences/
83
84
main.c
85
<pre><code class="cpp">
86
...
87
#include <Preferences.h>
88
...
89
Preferences preferences;
90
...
91
void setup()
92
{
93
...
94
// HOME READ FLASH
95
  preferences.begin("pref_KSAP6", false);
96
  Ctrl_mode.home_X = preferences.getFloat("coor_x", HOME_X);
97
  Ctrl_mode.home_Y = preferences.getFloat("coor_y", HOME_Y);
98
  Ctrl_mode.home_T = preferences.getFloat("coor_a", HOME_T);
99
  preferences.end();
100
  SERIAL_DEBUG.println("HOME READ FLASH OK");
101
...
102
}
103
</code></pre>
104
Joystick.c
105
<pre><code class="cpp">
106
...
107
#include <Preferences.h>
108
...
109
void JOY_Read(void)
110
{
111
112
...
113
  // HOME MEMO FLASH
114
  if (digitalRead(JOY_PinSWJOY1) == LOW)
115
  {
116
    Ctrl_mode.home_X = Ctrl_mode.coord.x;
117
    Ctrl_mode.home_Y = Ctrl_mode.coord.y;
118
    Ctrl_mode.home_T = Ctrl_mode.coord.a;
119
120
    extern Preferences preferences;
121
    preferences.begin("pref_KSAP6", false);
122
    preferences.putFloat("coor_x", Ctrl_mode.coord.x);
123
    preferences.putFloat("coor_y", Ctrl_mode.coord.y);
124
    preferences.putFloat("coor_a", Ctrl_mode.coord.a);
125
    preferences.end();
126
    if (Ctrl_mode.verbose == true)
127
    {
128
      SERIAL_DEBUG.printf("HOME FLASH X=%.3fmm Y=%.3fmm T=%.3f°\r\n", Ctrl_mode.home_X, Ctrl_mode.home_Y, Ctrl_mode.home_T);
129
    }
130
  }
131
...
132
</code></pre>
133
134 8 Frédéric Blanc
h3. Communication
135 19 Frédéric Blanc
136 1 Frédéric Blanc
!clipboard-202201281407-mpdxz.png!
137 19 Frédéric Blanc
138 8 Frédéric Blanc
TXB0108  8-Bit Bidirectional Voltage-Level Translator 100 Mbps
139 1 Frédéric Blanc
https://www.ti.com/lit/ds/symlink/txb0108.pdf
140 18 Frédéric Blanc
141
!!! BUG TX2 -> TXB0108 -> RXGRBL  liaison directe TX2 -> RXGRBL
142 22 Frédéric Blanc
143 1 Frédéric Blanc
!clipboard-202303011507-vsd5v.png!
144 28 Frédéric Blanc
145
h2. Auto theta
146
147
148 25 Frédéric Blanc
149
h3. le prototype
150
151
!clipboard-202303041338-kvddx.png!