shaoxiongduan / sci-calc

software and firmware for a esp32-based scientific calculator
MIT License
344 stars 17 forks source link

How to install the update for the macropad #4

Closed Bow3ryList closed 1 month ago

Bow3ryList commented 3 months ago

Hi Shao,

How do I update the SCI-CALC with the fix for the macropad (does is fix the issue with the 7, 8 and 9 keys being swapped with the esc, and the bracket keys)? Is it a case of downloading all the files and putting them onto the SD card using an adaptor or is it just the .bin put the needs to be copied over to the SD in the corresponding folder?

Thanks

Tom

shaoxiongduan commented 3 months ago

Hello Tom,

You have to download the main.bin file from my github page (the bin files are located in the sci-calc-code/bin folder) and replace the main.bin in the microsd card. Once that's done go to the settings page in the sci-calc, if there is an update from SD option click that, if not then go to the programs page, select any game in the bin, and wait for the game to load. Once the game loads you can press esc to go back (the sci-calc freezes for a moment here, dont worry). And you should be running the newest code! If you have any problems or discover any bugs please let me know!

-Shao

On Mon, Jul 22, 2024 at 9:44 PM Bow3ryList @.***> wrote:

Hi Shao,

How do I update the SCI-CALC with the fix for the macropad (does is fix the issue with the 7, 8 and 9 keys being swapped with the esc, and the bracket keys)? Is it a case of downloading all the files and putting them onto the SD card using an adaptor or is it just the .bin put the needs to be copied over to the SD in the corresponding folder?

Thanks

Tom

— Reply to this email directly, view it on GitHub https://github.com/shaoxiongduan/sci-calc/issues/4, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALD2VZ3Z76FRPBRGLX7SUCLZNUEDTAVCNFSM6AAAAABLILPMC6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQZDEOJSGE2DSOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Bow3ryList commented 3 months ago

Yep, that has fixed the numbers. Thanks

Next question is how do I change the macro customisable keys as I think they are formatted for a different system (maybe for a mac?) . For example, 'copy' launches copilot (windows key +c) on windows 11 and 'paste' launches the clipboard viewer which is 'windows key' and 'v'. Is there a way to edit this?

Thanks in advance for your help

Tom

shaoxiongduan commented 3 months ago

Currently you have to modify the code to do so, so follow the vscode + platformio "Setting up dev enviroment" guide in the README. Once the code is set, open up the UIMain.cpp file, and you can modify macros there. Below are some of the name of the keys. So for your case, it's KEY_LEFT_GUI for the windows key.

image
sierrax369 commented 3 months ago

Hi Shao Do you have a timeline when you switch to a "textfile-based" Macro solution? Kind Regards

Bow3ryList commented 3 months ago

vscode + platformio

Ah, okay - I thought it needed the 'Arduino IDE' to also be installed to allow the code to be modified. It wasn't clear to me what the 'Arduino IDE' section of setting up the developer environment is required for?

Once the UIMain.cpp has been edited, does it again just replace the file the SD card?

shaoxiongduan commented 3 months ago

The Arduino IDE is another option if you want to develop more programs for the sci-calc. Most of the code for the sci-calc are coded with the vscode+platformio configuration.

To update the code, first save the changes you made in the UIMain.cpp file, and then press upload at the bottom:

image

And also you need to update the main.bin file in the sd card. First locate the firmware.bin file compiled:

image

Then copy it to the sd-card and rename it to main.bin. After that, everything should be properly saved and working.

Bow3ryList commented 3 months ago

Okay, have follow those steps up to 'upload' but I get the following error message once it completes

image

Is that normal, or have I made a mistake copying the cloning the codes files?

Thanks

yangnuozhen commented 2 months ago

Okay, have follow those steps up to 'upload' but I get the following error message once it completes

image

Is that normal, or have I made a mistake copying the cloning the codes files?

Thanks

Hi Tom,

It seems that you did not specify the upload port during the upload process. Please ensure that SCI-CALC is connected to the computer and that the computer can correctly detect and establish a connection with the port.

To check if the port is correctly connected to the computer, you can follow these steps:

On Windows

  1. Device Manager:

    • Right-click on the "This PC" or "Computer" icon and select "Manage".
    • In the opened "Computer Management" window, select "Device Manager" on the left side.
    • Expand the "Ports (COM & LPT)" section, where you should see the connected device and its corresponding port number (e.g., COM3, COM4, etc.).
  2. CMD:

    • Open Command Prompt (press Win + R, type cmd, and then press Enter).
    • Enter the following command to view the currently connected serial ports:

      mode

On macOS

  1. Terminal:

    • Open Terminal (you can find it in "Applications" -> "Utilities").

    • Enter the following command to view the currently connected serial ports:

      ls /dev/tty.*
    • You should see devices like /dev/tty.usbserial-xxxx or /dev/tty.usbmodemxxxx.

On Linux

  1. Terminal:

    • Open Terminal.

    • Enter the following command to view the currently connected serial ports:

      dmesg | grep tty
    • You should see devices like /dev/ttyUSB0 or /dev/ttyACM0.

Using PlatformIO to Check Ports

If you want to check whether the device is correctly recognized by PlatformIO, you can use the following command to list all ports readable by PlatformIO:

pio device list

This will display all currently connected serial devices and their detailed information.

After ensuring the correct connection, try uploading again.

Hope this helps!

Bow3ryList commented 2 months ago

Thanks for bearing with us on that one Shao - just got around to trying that and it appears to have done the trick and allowed me to edit the marcopad functions so that they are compatible with Windows :)