Project

General

Profile

Actions

Wiki » History » Revision 31

« Previous | Revision 31/32 (diff) | Next »
Frédéric Blanc, 2023-09-12 10:34


Console KSAP6

alim

ftdi

generic grbl message parser

https://github.com/jschoch/grbl_chat

écran


NEXTION NX8048P070-011R

https://nextion.tech/datasheets/nx8048p070-011r/

Communication

GPIO9 UART_DEV(1):TxD SD2 (17)
GPIO10 UART_DEV(1):RxD SD3 (18) (ne fonctionne pas

Serial1.begin(9600, SERIAL_8N1 , 4, 2);
RxD GPIO4
TxD GPIO2

remapé le port serial1

Serial Port Baudrate 9600

dans la lib ITEADLIB_Arduino_Nextion fichier NexConfig.h ligne 34

...
/**
 * Define nexSerial for communicate with Nextion touch panel. 
 */
#define nexSerial Serial1
#define NEXRXPIN 4
#define NEXTXPIN 2
...

timer

https://projetsdiy.fr/esp32-timers-alarmes-code-arduino/

Lib

https://github.com/itead/ITEADLIB_Arduino_Nextion/archive/master.zip

https://randomnerdtutorials.com/nextion-display-with-arduino-getting-started/

joystick

HOME

mode JOG

https://github.com/gnea/grbl/blob/master/doc/markdown/jogging.md

CPU


ESP32-WROOM-32D
https://www.mouser.fr/ProductDetail/Espressif-Systems/ESP32-WROOM-32DM113DH2800PH3Q0

variable en flash
https://randomnerdtutorials.com/esp32-save-data-permanently-preferences/

main.c

...
#include <Preferences.h>
...
Preferences preferences;
...
void setup()
{
...
// HOME READ FLASH
  preferences.begin("pref_KSAP6", false);
  Ctrl_mode.home_X = preferences.getFloat("coor_x", HOME_X);
  Ctrl_mode.home_Y = preferences.getFloat("coor_y", HOME_Y);
  Ctrl_mode.home_T = preferences.getFloat("coor_a", HOME_T);
  preferences.end();
  SERIAL_DEBUG.println("HOME READ FLASH OK");
...
}

Joystick.c
...
#include <Preferences.h>
...
void JOY_Read(void)
{

...
  // HOME MEMO FLASH
  if (digitalRead(JOY_PinSWJOY1) == LOW)
  {
    Ctrl_mode.home_X = Ctrl_mode.coord.x;
    Ctrl_mode.home_Y = Ctrl_mode.coord.y;
    Ctrl_mode.home_T = Ctrl_mode.coord.a;

    extern Preferences preferences;
    preferences.begin("pref_KSAP6", false);
    preferences.putFloat("coor_x", Ctrl_mode.coord.x);
    preferences.putFloat("coor_y", Ctrl_mode.coord.y);
    preferences.putFloat("coor_a", Ctrl_mode.coord.a);
    preferences.end();
    if (Ctrl_mode.verbose == true)
    {
      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);
    }
  }
...

Communication

TXB0108 8-Bit Bidirectional Voltage-Level Translator 100 Mbps
https://www.ti.com/lit/ds/symlink/txb0108.pdf

!!! BUG TX2 -> TXB0108 -> RXGRBL liaison directe TX2 -> RXGRBL

le prototype

Auto theta

Updated by Frédéric Blanc about 1 year ago · 31 revisions