Project

General

Profile

Wiki » History » Version 32

Frédéric Blanc, 2023-12-13 15:15

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