Planète Casio - Autres questions - Flux RSS http://www.planet-casio.com Programmes Casio, Jeux, Cours pour Calculatrices Casio fr-FR https://www.planet-casio.com/images/logo.gif Planète Casio - Autres questions - Flux RSS http://www.planet-casio.com 55 50 Programmes Casio, Jeux, Cours pour Calculatrices Casio. Fri, 01 Aug 2025 21:59:30 GMT Fri, 01 Aug 2025 21:59:30 GMT contact@planet-casio.com (Planet Casio) contact@planet-casio.com (Planet Casio) 5 Données corrompues entre Casio et ESP32 (série) https://www.planet-casio.com/Fr/forums/topic18897--.html Bonjour à tous, Je travaille sur un projet où j’essaie d’établir une communication série entre ma Casio Graph 35+E II (fx-9750giii) et un ESP32, en passant par la prise jack TRS 2,5 mm. Je rencontre actuellement des problèmes de transmission : les données sont souvent corrompues ou incohérentes, et j’aimerais beaucoup avoir votre aide pour diagnostiquer le problème. Configuration : J’ai soudé des fils directement depuis la prise TRS vers l’ESP32. La continuité des fils a été vérifiée et confirmée. J’utilise le SDK fx-9860G de Casio. Le port série est configuré en 9600 bauds, 8 bits de données, aucune parité, 1 bit d’arrêt (8N1). Le problème : Lorsque j’envoie le message "Hello World\r\n" depuis la calculatrice, il arrive qu’il soit reçu correctement sur l’ESP32, mais la plupart du temps, les données sont brouillées ou corrompues. Voici un exemple de ce que j’obtiens dans le moniteur série : He▒▒▒▒World He▒▒ ▒▒ɱ▒5 He▒▒▒▒World He▒▒ ▒▒ɱ▒5 He▒▒ ▒▒ɱ▒5 He▒▒ ▒▒ɱ▒5 He▒▒ ▒▒ɱ▒5 He▒▒▒▒World Parfois, le message passe correctement, ce qui me laisse penser que la connexion physique est probablement correcte, mais quelque chose perturbe toujours la transmission. Mes questions : Le problème pourrait-il venir du câblage ? Est-ce que ma calculatrice pourrait avoir un défaut matériel ? Y a-t-il une erreur dans le code ou dans l’initialisation du port série ? Est-ce une incompatibilité au niveau du protocole (par exemple : niveaux de tension, stop bits, etc.) ? Et parfois, le port série refuse tout simplement de s’ouvrir, sans raison évidente. J’utilise les appels système (syscalls) listés sur cette page : https://bible.planet-casio.com/simlo/chm/v20/fx_legacy_Serial.htm Merci pour toute aide ! Calculator Code /* * ================================================================================= * Interactive Serial "Hello World" for Casio fx-9860G * ================================================================================= * * Description: * This Add-In sends "Hello World" over the serial port (2.5mm TRS jack). * * Instructions: * - Run the Add-In from the main menu. * - Press [F1] to send the "Hello World" message. * - Press to close the serial port and exit the application. */ #include "fxlib.h" #include <string.h> /* * ================================================================================= * Serial Syscall Definitions * ================================================================================= * The standard fx-9860G SDK does not provide C headers for the serial port. * We define them here using a C-based stub that calls the OS routines directly. */ /** * @brief Syscall 0x0418: Opens the serial port with the given configuration. */ const unsigned int sc_serial_open[] = { 0xD201D002, 0x422B0009, 0x80010070, 0x0418 }; typedef int (*sc_serial_open_t)(unsigned char*); #define Serial_Open ((sc_serial_open_t)sc_serial_open) /** * @brief Syscall 0x040E: Puts one byte into the serial transmit buffer. * This is inspired by the Serial_BufferedTransmitOneByte example in the forum post. */ const unsigned int sc_serial_write_byte[] = { 0xD201D002, 0x422B0009, 0x80010070, 0x040E }; typedef int (*sc_serial_write_byte_t)(unsigned char); #define Serial_WriteByte ((sc_serial_write_byte_t)sc_serial_write_byte) /** * @brief Syscall 0x0419: Closes the serial port. */ const unsigned int sc_serial_close[] = { 0xD201D002, 0x422B0009, 0x80010070, 0x0419 }; typedef int (*sc_serial_close_t)(int); #define Serial_Close ((sc_serial_close_t)sc_serial_close) /* * ================================================================================= * Main Application * ================================================================================= */ // Global flag to track the serial port status int g_is_port_open = 0; /** * @brief Sends the "Hello World" string character by character. */ void SendHelloWorld(void) { const char* message = "Hello World\n"; int i; if (!g_is_port_open) { locate(1, 4); Print((unsigned char*)"Error: Port is not open! "); Bdisp_PutDisp_DD(); return; } for (i = 0; i < strlen(message); ++i) { Serial_WriteByte(message); } locate(1, 4); Print((unsigned char*)"Sent: 'Hello World' "); // Pad with spaces to clear previous messages Bdisp_PutDisp_DD(); } int AddIn_main(int isAppli, unsigned short OptionNum) { unsigned int key; unsigned char serial_config[] = {0, 5, 0, 0, 0, 0}; // 9600 baud, 8N1 Bdisp_AllClr_DDVRAM(); locate(1, 1); Print((unsigned char*)"Serial Communication Demo"); locate(1, 2); Print((unsigned char*)"-----------------------"); locate(1, 6); Print((unsigned char*)"[F1] Send 'Hello World'"); locate(1, 7); Print((unsigned char*)" Exit"); // Attempt to open the serial port if (Serial_Open(serial_config) == 0) { g_is_port_open = 1; locate(1, 4); Print((unsigned char*)"Serial port opened."); } else { g_is_port_open = 0; locate(1, 4); Print((unsigned char*)"Error: Failed to open port"); } Bdisp_PutDisp_DD(); // Main event loop while(1) { GetKey(&key); if (key == KEY_CTRL_F1) { SendHelloWorld(); } else if(key == KEY_CTRL_EXE) { break; } } // Close the port before exiting if (g_is_port_open) { Serial_Close(1); } return 1; } #pragma section _BR_Size unsigned long BR_Size; #pragma section #pragma section _TOP int InitializeSystem(int isAppli, unsigned short OptionNum) { return INIT_ADDIN_APPLICATION(isAppli, OptionNum); } #pragma section ESP32 Code /* * ================================================================================= * ESP32 Receiver for Casio fx-9860G Serial Communication * ================================================================================= * Description: * This code listens for serial data from a Casio calculator on HardwareSerial port 2. * It's configured for 9600 baud, 8N1, to match the calculator's settings. */ // Define the pins for the secondary serial port (Serial2) #define CALC_RX_PIN 16 // GPIO 16 #define CALC_TX_PIN 17 // GPIO 17 void setup() { Serial.begin(115200); // Initialize the secondary serial port to communicate with the calculator // Baud Rate: 9600 // Config: SERIAL_8N1 (8 data bits, No parity, 1 stop bit) // Pins: RX on GPIO 16, TX on GPIO 17 Serial2.begin(9600, SERIAL_8N1, CALC_RX_PIN, CALC_TX_PIN); Serial.println("\nESP32 Serial Receiver Initialized"); Serial.println("---------------------------------"); Serial.print("Listening on GPIO "); Serial.print(CALC_RX_PIN); Serial.println(" at 9600 baud..."); Serial.println("Waiting for message from Casio calculator..."); } void loop() { // Check if there is data available from the calculator if (Serial2.available()) { // Read the incoming byte from the calculator and write it to the Serial Monitor char receivedChar = Serial2.read(); Serial.print(receivedChar); } } Thu, 31 Jul 2025 04:35:05 +0200 Casio CG50 vs CG100 https://www.planet-casio.com/Fr/forums/topic18894--.html Je me demande donc quelle est votre opinion sur le grapher Casio cg50 par rapport à la nouvelle version cg100 ? Est-ce que cela va être un autre fiasco comme celui du « FX-991CW », où la nouvelle version est moins bonne que l'ancienne ? J'hésite à acheter un cg50 tant qu'il est encore disponible, et je me demande si le cg50 est réellement meilleur/plus performant/de meilleure qualité, etc. que le nouveau cg100. Tous vos commentaires/avis sont les bienvenus :) Wed, 30 Jul 2025 08:46:37 +0200 Comment implémenter une saisie mathématique type eActivity ? https://www.planet-casio.com/Fr/forums/topic18891--.html Je développe avec le SDK fx-9860G et j’essaie d’implémenter une saisie mathématique claire et intuitive, comme dans cet exemple : https://i.imgur.com/kvoghRm.png Mais mon application actuelle ressemble plutôt à ça : https://i.imgur.com/uc5M6N6.png J’aimerais reproduire l’expérience de saisie de l’application eActivity intégrée, mais je suis un peu perdu sur la façon de m’y prendre. Quelqu’un aurait-il un extrait de code ou des conseils à partager ? Toute aide serait la bienvenue ! Tue, 29 Jul 2025 06:11:51 +0200 How do I use the serial communication function of the 9750giii or 9860gii? https://www.planet-casio.com/Fr/forums/topic18824--.html How do I use the serial communication function of the 9750giii or 9860gii? I want to create a g1a plugin to use the TRS serial port to enable the 9750giii or 9860gii to connect to the ESP32C3 for interfacing with the AI API. However, I have no idea how to develop this function using the SDK. According to the AI's prompt, it informed me of many header files that do not exist in the SDK, such as serial.h or files in syscalls.src, and I always couldn't find a way to open the serial port. Thu, 03 Jul 2025 11:13:12 +0200 using fxsdk with clangd (neovim) https://www.planet-casio.com/Fr/forums/topic18816--.html I've been doing some development for the fx-cg50 using fxsdk/gint and it's going great so far, but I can't seem to get clangd to find the right header files. I've modified CMakeLists.txt to generate a compile_commands.json file, and added the --query-driver option for clangd to find the right compiler (sh-elf-gcc) to my neovim config. It does seem to find the compiler and most of its default header files, including gint, but I get an error where it can't find "stdint-gcc.h". Has anyone got this working in neovim (or some other editor that uses clangd as its lsp)? VSCode works fine and finds the compiler/includes no problem with the config generated by fxsdk, but I'd rather work with my usual C setup. Sat, 28 Jun 2025 05:50:09 +0200 Compiling sh-gcc separately https://www.planet-casio.com/Fr/forums/topic18806--.html I'm having some trouble compiling sh-gcc manually according to Method 3 listed here. This is the error: configure: error: cannot compute suffix of object files: cannot compile I tried first in a Docker container starting with the debian:latest image then again with a fresh Debian install in a VM and got the same error. Here is what I tried: - Downloaded and decompressed gcc-15.1.0.tar.xz from https://ftp.gnu.org/gnu/gcc/gcc-15.1.0/. I want 15.1.0 specifically for the musttail attribute. I plan to compile just one of the C files in my project to assembly with -S with this toolchain, so I don't need the full fxsdk functionality. - Created directory /home/druzyek/sh-gcc/gcc and set SYSROOT to that. - Set VERSION to 15.1.0 - sudo apt install build-essential - Followed the command line instructions for Method 3 but did not run the patch line since not using GCC 11.1 or earlier. - The error happens when running `make -j$(nproc) all-gcc all-target-libgcc` Here is the error text and checking a few things:checking for sh3eb-elf-gcc... /home/druzyek/sh-gcc/build/./gcc/xgcc -B/home/druzyek/sh-gcc/build/./gcc/ -B/home/druzyek/sh-gcc/gcc/sh3eb-elf/bin/ -B/home/druzyek/sh-gcc/gcc/sh3eb-elf/lib/ -isystem /home/druzyek/sh-gcc/gcc/sh3eb-elf/include -isystem /home/druzyek/sh-gcc/gcc/sh3eb-elf/sys-include checking for suffix of object files... configure: error: in `/home/druzyek/sh-gcc/build/sh3eb-elf/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details make: *** [Makefile:15378: configure-target-libgcc] Error 1 druzyek@debian:~/sh-gcc/build$ echo $SYSROOT /home/druzyek/sh-gcc/gcc druzyek@debian:~/sh-gcc/build$ echo $VERSION 15.1.0 druzyek@debian:~/sh-gcc/build$ cd .. druzyek@debian:~/sh-gcc$ ls ar as build gcc gcc-15.1.0 gcc.tar.xz ld ranlib Fri, 20 Jun 2025 20:16:13 +0200 Conversion DEC-BIN-HEX https://www.planet-casio.com/Fr/forums/topic18803--.html Hello, J'ai trouvé pas mal de convertisseur DEC -> BIN/HEX mais aucun DEC <-> BIN <-> HEX Il parait qu'il y a des fonction déjà implémentées dans la Graph 35+ "améliorée" qui existent pour faire ça. Seulement je n'arrive toujours qu'a convertir du DEC-> BIN ou HEX et jamais l'inverse. Une idée de comment faire ? Merci d'avance ! Tue, 17 Jun 2025 12:20:48 +0200 Typing on fxcg50 https://www.planet-casio.com/Fr/forums/topic18785--.html I am currently working on my add in where you are guessing a code which consists of only numbers and signs on the keyboard fxcg50. You type your code that you guessed and it causes it to appear on screen on the left hand side then if you guess the code correctly pressing EXE allows you to continue further on if wrong it causes the exact thing you typed to appear 1 line below from the right hand side just as if you were having a conversation on something like WhatsApp. However I am very confused on how to approach this. Not the guessing logic but the typing logic and also (especially the duplication part) as there are multiple ways shown on the Prizm wiki on how to "type" but confused on which syscalls to use to achieve this properly and for the duplication part. I also in my previous code have used https://prizm.cemetech.net/Syscalls/Keyboard/GetKeyWait_OS/ which I believe has some sort of affect on me pressing keys Any pointers or help to the right direction on how to carry this out would be appreciated! Fri, 30 May 2025 23:49:00 +0200 Scrollbar https://www.planet-casio.com/Fr/forums/topic18784--.html https://prizm.cemetech.net/Syscalls/UI_elements/Scrollbar/#parameters Does anyone know what these mean exactly: typedef struct{ unsigned int i1; // unknown, set to zero unsigned int indicatormaximum; // maximum logical indicator range unsigned int indicatorheight; // height of the indicator in units of indicatormaximum unsigned int indicatorpos; // indicator position in units of indicatormaxiumum unsigned int i5; // unknown, set to zero unsigned short barleft; // left position of the bar in pixels unsigned short bartop; // top position of the bar in pixels unsigned short barheight; // height of the bar in pixels unsigned short barwidth; // width of the bar in pixels } TScrollbar; I of course understand the last two but do not get the rest Fri, 30 May 2025 21:36:04 +0200 Change the type to add-in? https://www.planet-casio.com/Fr/forums/topic18776--.html I noticed that this search didn't show any of my programs. The reason is that it searches only for type "Add-In", which is a type that I somehow never noticed. This probably means that all of my programs are mistyped. :sry: I'm guessing that the other types were actually meant for Casio BASIC, because add-in's came later? Would an admin be willing to change the type of the following programs to "Add-In"? I can't seem to change them myself: • https://www.planet-casio.com/Fr/programmes/programme4295-1-klondike-solitaire-calamari-jeux-reflexion.html • https://www.planet-casio.com/Fr/programmes/programme4299-1-Laser-Logic-calamari-jeu-reflexion.html • https://www.planet-casio.com/Fr/programmes/programme4458-1-Sokoban-calamari-jeu-reflexion.html • https://www.planet-casio.com/Fr/programmes/programme4469-1-Trick-Candles-calamari-jeu-action-sport.html • https://www.planet-casio.com/Fr/programmes/programme4537-1-Abacus-calamari-cours-maths_mathematiques.html I'm not sure what to do about these, as they're neither Casio BASIC nor add-ins (do we want additional types for these?): • Python: https://www.planet-casio.com/Fr/programmes/programme4293-1-Solitaire-Python-calamari-jeu-reflexion.html • S-SHT: https://www.planet-casio.com/Fr/programmes/programme4294-1-S-SHT-Tic-Tac-Toe-calamari-jeu-reflexion.html • S-SHT: https://www.planet-casio.com/Fr/programmes/programme4451-1-S-SHT-Video-Poker-calamari-jeu-reflexion.html • S-SHT (or the Duvet add-in): https://www.planet-casio.com/Fr/programmes/programme4467-1-Campus-calamari-jeu-reflexion.html Thank you and I apologize for my mess! Tue, 27 May 2025 00:29:16 +0200