Project

General

Profile

Wiki » History » Version 26

Frédéric Blanc, 2023-03-22 15:50

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
!clipboard-202201171441-eyqok.png!
64 4 Frédéric Blanc
ref J1-00105 de ETI Systems
65 5 Frédéric Blanc
cosse de connexion type FASTON 1.25mm
66 6 Frédéric Blanc
67
circuit anti-rebond MAX6817 (dual)
68
https://www.mouser.fr/ProductDetail/Maxim-Integrated/MAX6817EUT%252bT
69 7 Frédéric Blanc
70 20 Frédéric Blanc
71
h3. mode JOG
72
73
https://github.com/gnea/grbl/blob/master/doc/markdown/jogging.md
74
75 7 Frédéric Blanc
h2. CPU
76
77
!clipboard-202201181534-mvjil.png!
78
ESP32-WROOM-32D
79
https://www.mouser.fr/ProductDetail/Espressif-Systems/ESP32-WROOM-32DM113DH2800PH3Q0
80 8 Frédéric Blanc
81 26 Frédéric Blanc
82
variable en flash
83
https://randomnerdtutorials.com/esp32-save-data-permanently-preferences/
84
85
main.c
86
<pre><code class="cpp">
87
...
88
#include <Preferences.h>
89
...
90
Preferences preferences;
91
...
92
void setup()
93
{
94
...
95
// HOME READ FLASH
96
  preferences.begin("pref_KSAP6", false);
97
  Ctrl_mode.home_X = preferences.getFloat("coor_x", HOME_X);
98
  Ctrl_mode.home_Y = preferences.getFloat("coor_y", HOME_Y);
99
  Ctrl_mode.home_T = preferences.getFloat("coor_a", HOME_T);
100
  preferences.end();
101
  SERIAL_DEBUG.println("HOME READ FLASH OK");
102
...
103
}
104
</code></pre>
105
Joystick.c
106
<pre><code class="cpp">
107
...
108
#include <Preferences.h>
109
...
110
void JOY_Read(void)
111
{
112
113
...
114
  // HOME MEMO FLASH
115
  if (digitalRead(JOY_PinSWJOY1) == LOW)
116
  {
117
    Ctrl_mode.home_X = Ctrl_mode.coord.x;
118
    Ctrl_mode.home_Y = Ctrl_mode.coord.y;
119
    Ctrl_mode.home_T = Ctrl_mode.coord.a;
120
121
    extern Preferences preferences;
122
    preferences.begin("pref_KSAP6", false);
123
    preferences.putFloat("coor_x", Ctrl_mode.coord.x);
124
    preferences.putFloat("coor_y", Ctrl_mode.coord.y);
125
    preferences.putFloat("coor_a", Ctrl_mode.coord.a);
126
    preferences.end();
127
    if (Ctrl_mode.verbose == true)
128
    {
129
      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);
130
    }
131
  }
132
...
133
</code></pre>
134
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 24 Frédéric Blanc
!clipboard-202303011507-vsd5v.png!
146 25 Frédéric Blanc
147
h3. le prototype
148
149
!clipboard-202303041338-kvddx.png!