Upload error failed uploading no upload port provided

I have connected my Arduino UNO through USB to Raspberry pi 3B. I am using CLI for editing, compiling and uploading sketches > arduino-cli upload --fqbn arduino:avr:uno cli-test. However, after

You specify the port with the --port flag to the upload command:

$ arduino-cli upload --fqbn arduino:avr:uno --port /dev/ttyACM0 cli-test

You can find all these things out for yourself by using --help at any time. For example:

$ arduino-cli upload --help
Upload Arduino sketches. This does NOT compile the sketch prior to upload.

Usage:
  arduino-cli upload [flags]

Examples:
  arduino-cli upload /home/user/Arduino/MySketch

Flags:
      --board-options strings        List of board options separated by commas. Or can be used multiple times for multiple options.
      --discovery-timeout duration   Max time to wait for port discovery, e.g.: 30s, 1m (default 1s)
  -b, --fqbn string                  Fully Qualified Board Name, e.g.: arduino:avr:uno
  -h, --help                         help for upload
      --input-dir string             Directory containing binaries to upload.
  -i, --input-file string            Binary file to upload.
  -p, --port string                  Upload port address, e.g.: COM3 or /dev/ttyACM2
  -P, --programmer string            Programmer to use, e.g: atmel_ice
  -l, --protocol string              Upload port protocol, e.g: serial
  -t, --verify                       Verify uploaded binary after the upload.

Global Flags:
      --additional-urls strings   Comma-separated list of additional URLs for the Boards Manager.
      --config-file string        The custom config file (if not specified the default will be used).
      --format string             The output format for the logs, can be: text, json, jsonmini, yaml (default "text")
      --log-file string           Path to the file where logs will be written.
      --log-format string         The output format for the logs, can be: text, json
      --log-level string          Messages with this level and above will be logged. Valid levels are: trace, debug, info, warn, error, fatal, panic
      --no-color                  Disable colored output.
  -v, --verbose                   Print the logs on the standard output.

“Upload Using Programmer” with “Arduino as ISP” programmer doesn’t work #347

Comments

kittaakos commented Sep 9, 2020

Originally reported by @per1234:

Steps to reproduce the behavior:

  • Turn an Arduino board into an “Arduino as ISP” programmer as shown in this tutorial: https://www.arduino.cc/en/Guide/ArduinoISP
  • Connect the “Arduino as ISP” to the target AVR board.
  • From the board menu, select the board for the target board, and the port of the “Arduino as ISP” board.
  • Tools > Programmer > Arduino as ISP
  • Sketch > Upload Using Programmer

The process fails:

Unlike the other programmers, which are pure USB devices, the “Arduino as ISP” programmer requires a serial port selection.

I should clarify that the above is the full set of steps that should achieve a successful “Upload Using Programmer” with the “Arduino as ISP” programmer. If you only want to reproduce the bug, these steps are sufficient:

  • Select any board of the Arduino AVR Boards platform from the board menu.
  • Select any port
  • Tools > Programmer > Arduino as ISP
  • Sketch > Upload Using Programmer

With a correctly working IDE, this minimal set of steps will still be expected to fail due to not having an Arduino as ISP programmer connected to the computer, but it should fail with these errors:

The text was updated successfully, but these errors were encountered:

Источник

«Please specify upload_port » error even though I’m uploading using USBasp #158

Comments

MCUdude commented Aug 12, 2019

I go this strange error and AFAIK I’ve never seen this before.
I’m trying to upload code to an ATmega324PB (MightyCore) and have the following platformio.ini file

For uploading, I choose «Upload using Programmer» under env:MightyCore. After a short while I get this error:

Why do I have to specify upload_port when I’m using a USBasp programmer?

The text was updated successfully, but these errors were encountered:

MCUdude commented Aug 20, 2019

@ivankravets maybe this issue should be moved to the platformio-core repo instead? Not sure if this is AVR related or not.

ivankravets commented Aug 20, 2019

Do use Program target?

MCUdude commented Aug 20, 2019

The output seen in my first post is when using «Upload using Programmer». When trying to upload by just clicking «Upload» I get this error:

So it seems like «Upload» accept a missing serial port, while «Upload using programmer» don’t.

MCUdude commented Aug 20, 2019

Don’t worry about the avrdude error above. I didn’t have any hardware connected to my USBasp programmer, but that’s not the issue 😉

ivankravets commented Aug 20, 2019

Wow, this is a bug! 🙁 I’ve just fixed it. Please inform me when new releases of your cores will be available. We will do joined release.

MCUdude commented Aug 20, 2019

Awesome! PlatformIO is getting better every day 👍 Thank you for being so available and spending time helping out users like me!

Please inform me when new releases of your cores will be available.

AFAIK only MightyCore is affected by the SPI1 related bug we’ve discussed earlier. I’ll keep you informed! It won’t be long, promise 🙂

tablatronix commented Nov 18, 2019

How do I pull this change in, it is not yet release right?

tablatronix commented Nov 18, 2019

nogueira commented May 12, 2021

I still have the same problem.

nogueira commented May 12, 2021

it seems Platformio doesn’t accept port over COM10, I was using COM11 and after I changed to COM5 it works

demostenes63 commented Sep 9, 2021

That´s right. I changed COM13 to COM2 and it works!

HubKing commented Sep 14, 2021

it seems Platformio doesn’t accept port over COM10, I was using COM11 and after I changed to COM5 it works

Damn, this is so stupid. The COM port automatically kept increasing as I changed the port, and when it became COM11, PlatformIO did not recognise it. I opened Kitty and connected to COM11 and I could see the serial output so the port was working. After reading your comment, I changed the COM to a lower number like 5 (I had to remove all the «hidden» devices in the Device Manager), unplugged/re-plugged the cable, and now PlatformIO recognised the port.

ivankravets commented Sep 14, 2021

Could you revert back port to COM13 and try to run pio device list?

saintofinternet commented Nov 20, 2021

My Env. settings are as follows

[env:168pa16m]
platform = atmelavr
board = pro8MHzatmega328
framework = arduino
lib_deps = locoduino/MemoryUsage@^2.21.1
upload_protocol = usbasp

I am getting the following error after upload via USBASP programmer to an Arudino Pro Mini

avrdude: verifying .
avrdude: verification error, first mismatch at byte 0x20a9
0x21 != 0xf1
avrdude: verification error; content mismatch

avrdude: safemode: Fuses OK (E:FD, H:DA, L:FF)

Источник

Uploading error no upload port provided

After using the IDE for some time, the IDE decides that even though itself identified the board/port, the board/port in question does not exist according to the uploader. In the present issue, I have used a MKR WIFI 1010 and replicated the problem with another (new) board as well. This issue has been present on multiple computers, and is usually fixed by restarting the PC.

A video demonstration of the issue with the first board (COM18)
Screen sharing — 2022-08-08 5 49 21 PM.webm

Screenshots of IDE 2.0.0-rc9.1 with second board (COM17)

Screenshots of IDE 1.8.19 with second board (COM17)

To reproduce

  1. Use the IDE 2.x for some period of time
  2. Connect the MKR WIFI 1010 (without a battery)
  3. Make sure that the board and port are correctly selected
  4. Click on upload
  5. The message Failed uploading: uploading error: exit status 1 No device found on COMXX is shown.
  6. Close window and open blink sketch in IDE 1.x
  7. After selecting board/port, upload again
  8. You will get the same error.
    Bonus: Use another board and do steps 1-9 again

Expected behavior

The code is uploaded and the message Failed uploading: uploading error: exit status 1 No device found on COMXX is not shown in the outlet.

Arduino IDE version

Tested with: Arduino IDE 2.0.0-rc9.1 & Arduino IDE 1.8.19

Operating system

Operating system version

Additional context

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

Created at 2 months ago

Hi @aliphys. Thanks for your report.

Please try it with the latest nightly build and then tell us whether the issue still occurs. There was a bug with uploading in Arduino IDE 2.0.0-rc9.1, which has already been fixed (#1279), but since you are using the release version instead of the nightly, you don’t have that fix in your IDE.

Created at 5 months ago

I restarted my laptop, and now I can upload to the board. Both IDE 2.0.0-rc9.1 as well as the nightly version (20220808) can upload to the board.
IDE 2.0.0-rc9.1

IDE 2.0.0-rc9.1-nightly-20220808

Created at 5 months ago

On the first restart, it did not work. But the second time I restarted, I was able to upload the sketch.

As an additional note, I didn’t hear the windows hardware disconnect/reconnect sound (https://www.youtube.com/watch?v=I0btZwXX6Qs) when I had upload problems.

Created at 5 months ago

Thanks for checking. I’m glad it is working now. Please comment here if you experience the problem while using the nightly.

I didn’t hear the windows hardware disconnect/reconnect sound (https://www.youtube.com/watch?v=I0btZwXX6Qs) when I had upload problems.

A successful upload procedure for the MKR WiFi 1010 is like this:

  1. User starts the upload.
  2. IDE compiles the sketch
  3. IDE momentarily opens a serial connection to the MKR WiFi 1010 at 1200 baud
  4. MKR WiFi 1010 exits the sketch program in response to this special «1200 bps touch» signal
  5. Windows sees the disconnection of the USB CDC serial port device produced by the background code of the sketch program
  6. MKR WiFi 1010 runs the bootloader program
  7. Windows sees the connection of the USB CDC serial port device produced by the bootloader program
  8. IDE uploads the sketch program to the MKR WiFi 1010
  9. MKR WiFi 1010 exits the bootloader program and runs the sketch program

The bug in Arduino IDE 2.0.0-rc9.1 prevented the serial connection that was required during step (3). For this reason, the board does not go through the normal disconnection, reconnection cycle.

Created at 5 months ago

I have hit the same problem again: the IDE identifies the board as well as the port, yet refuses to upload. Similar to before, I do not hear the windows disconnect/reconnect sound.

Error message from IDE

I am on the nightly release (20220808).

I restarted my laptop. Now it is stuck on Uploading. . It has been like this for a few minutes.

To make this more clear, I have made a recording of what I have done.
Screen sharing — 2022-08-09 6 24 30 PM.webm

I then re-opened the IDE (again, on the nightly version) and again showed what steps I have taken
Screen sharing — 2022-08-09 6 27 43 PM.webm

This is the screenshot of the final result, upon uploading again as seen in the second video.

Hope this helps. Let me know if I can provide further information. 🙂

Created at 5 months ago

I’m going to ask you to provide the output from the upload when in verbose mode. Hopefully that will offer some clues about the problem.

  1. Select File > Preferences from the Arduino IDE menus.
  2. Uncheck the box next to Show verbose output during: > ☑ compilation.
  3. Check the box next to Show verbose output during > ☐ upload if it is not already checked.
  4. Click the OK button.
  5. Select Sketch > Upload from the Arduino IDE menus.
  6. Wait for upload to fail.
  7. After the upload fails you’ll see a button on the «Upload error» notification at the bottom right corner of the IDE window: COPY ERROR MESSAGES . Click that button.
  8. Paste the copied error messages in a reply here.

Created at 5 months ago

This is what I get after a few seconds in the terminal.

Sketch uses 26848 bytes (10%) of program storage space. Maximum is 262144 bytes.
Global variables use 3620 bytes (11%) of dynamic memory, leaving 29148 bytes for local variables. Maximum is 32768 bytes.
Performing 1200-bps touch reset on serial port COM18

After 3 minutes, these lines appear.

Waiting for upload port.
No upload port found, using address:»COM18″ protocol:»serial» as fallback
«C:UsersuserAppDataLocalArduino15packagesarduinotoolsbossac1.7.0-arduino3/bossac.exe» -i -d —port=COM18 -U true -i -e -w -v «C:UsersuserAppDataLocalTemparduino-sketch-666DC4B8437D462214D0786F9C8ED2D6/sketch_aug9b.ino.bin» -R

10 minutes have passed since I have hit upload. The upload has not been successfully uploaded to the MKR WIFI 1010, nor has it failed. The IDE seems to have got stuck in uploading purgatory. 🙂

Created at 5 months ago

OK. Just as I hit Comment in GH, the IDE gave an error message.

Sketch uses 26848 bytes (10%) of program storage space. Maximum is 262144 bytes.
Global variables use 3620 bytes (11%) of dynamic memory, leaving 29148 bytes for local variables. Maximum is 32768 bytes.
Performing 1200-bps touch reset on serial port COM18
Waiting for upload port.
No upload port found, using address:»COM18″ protocol:»serial» as fallback
«C:UsersuserAppDataLocalArduino15packagesarduinotoolsbossac1.7.0-arduino3/bossac.exe» -i -d —port=COM18 -U true -i -e -w -v «C:UsersuserAppDataLocalTemparduino-sketch-666DC4B8437D462214D0786F9C8ED2D6/sketch_aug9b.ino.bin» -R
No device found on COM18
Failed uploading: uploading error: exit status 1

Created at 5 months ago

Does the problem also occur when you upload using Arduino IDE 1.8.19?

Do you have the serial port of the board open in any other program on your computer? That includes even having it open in the Serial Monitor of Arduino IDE 1.x while uploading using Arduino IDE 2.x.

Is COM18 identified in the Arduino IDE Tools > Port menu as «COM18 (Arduino MKR WiFi 1010)«? Make sure to use the Tools > Port menu for this check rather than the board selector on the Arduino IDE 2.x toolbar because the board selector shows whichever board selection you used with the port, not the identification of the port as the Port menu does.

Created at 5 months ago

Does the problem also occur when you upload using Arduino IDE 1.8.19?

Do you have the serial port of the board open in any other program on your computer? That includes even having it open in the Serial Monitor of Arduino IDE 1.x while uploading using Arduino IDE 2.x.

I am not aware of the Serial port being used for any other program. To make sure that there is no conflict, I closed the IDE version I am not using.

Is COM18 identified in the Arduino IDE Tools > Port menu as «COM18 (Arduino MKR WiFi 1010)»? Make sure to use the Tools > Port menu for this check rather than the board selector on the Arduino IDE 2.x toolbar because the board selector shows whichever board selection you used with the port, not the identification of the port as the Port menu does.

Port information according to:

Created at 5 months ago

Since you mentioned the port might be open by another program on the computer, I followed the steps in this Help Centre article to see if this is the case. I could not find a process that may have taken over the Serial port.

Created at 5 months ago

In order to provide more information on the possibility of the port being open by other programs, I tried to do three more tests.

  • First, I confirmed that the no process was blocking the port beforehand.
  • Secondly, you can see that arduino-cli.exe is taking over the process responsible for the COM port during upload. It fails again, similar to before
  • Thirdly, I tested with MATLAB R2021b.
    • Installation of the MATLAB Support Package for Arduino Hardware with the 22nd Jul 2022 update
    • While programing the MKR WIFI 1010 was underway in MATLAB, I searched for the process that was using the Serial port, stated as according to Process Explorer
      • You can see the full log here: MWArduinoLog-220811101009.txt. I will bring your attention to lines 222-224

          Created at 5 months ago

          • As a forth experiment, I tried to use the online editor to upload a sketch.

          Created at 5 months ago

          @aliphys are you sure you have a data cable?

          Check your connections. Your board needs to be connected with a data USB cable (charge-only cables will not work).

          Created at 4 months ago

          Hello @kittaakos
          Yes, it is a data cable. To confirm, I just uploaded a Blink sketch to an Arduino Nano with the same cable.

          Created at 4 months ago

          Update: After not touching my boards for nearly two weeks, the error is not displayed anymore.

          Created at 4 months ago

          Hi I met the exactly same problem. Both of my 2 MKR wifi 1010 got the same problem. After I uploaded the example=> blink, if I want to upload another sketch, the uploading time will take about 5 -10 min then an error message shows.

          Источник

per1234

Describe the problem

Arduino IDE supports communication channels (referred to as «ports») between board and computer of any arbitrary type. The Tools > Port menu is segmented into separate sections for each protocol of the available ports. Each of these sections has a heading describing the protocol.

🐛 The headings are located at the bottom of the sections in the Tools > Port menu.

To reproduce

Equipment

At least one recognized «port» on your computer. This could be produced by an Arduino, some other device, or an internal system port.

Steps

  1. Select Tools > Port from the Arduino IDE menus.

🐛 The headings are located at the bottom of the sections in the Tools > Port menu:

image

Expected behavior

Headings to be located at the top of the sections:

image

Arduino IDE version

2.0.1-snapshot-99b1094

Operating system

Windows

Operating system version

10

Additional context

I bisected the introduction of the bug to 960a2d0 (doesn’t occur when using the build for e577de4)

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

per1234

Describe the bug

A fresh install does not have any port selected. A new user may not realize they need to select a port, or perhaps they are unable to select one due to a driver or hardware problem.

Since a port selection is required for a standard upload, the upload is expected to fail under these cases but the IDE should clearly communicate the problem to the user.

This is done normally, but in the specific case of a fresh install the Upload attempt simply has no effect at all, leaving the user confused.

To Reproduce

  1. Quit the IDE if it is running.
  2. Delete the configuration folder (simulating a fresh install):
    • Windows:
      C:Users<user name>AppDataRoamingarduino-ide
      
    • Linux:
    • macOS:
      ~/Library/Application Support/arduino-ide/
      
  3. Start the Arduino IDE.
  4. Select Tools > Board > Arduino AVR Boards > Arduino Uno from the Arduino IDE menus.
    (Selected arbitrarily. The issue is not board specific.)
  5. Select Sketch > Upload from the Arduino IDE menus.
    🐛 Note that nothing at all happens and there is no feedback.
  6. Click the «Upload» button.
    🐛 Note that nothing at all happens and there is no feedback.
  7. Connect an Arduino board to your computer.
    (or anything that produces a serial port)
  8. Select the port from the Tools > Port menu.
  9. Select Sketch > Upload from the Arduino IDE menus.
  10. Wait for the upload to finish.
  11. Disconnect the Arduino board from your computer.
  12. Select Sketch > Upload from the Arduino IDE menus.
    🙂 The upload fails with a meaningful error message:

    Upload error: Failed uploading: no upload port provided

Expected behavior

Always communicate to the user when an upload is attempted without a port selected.

Desktop

  • OS: Windows 10
  • Version: 2.0.0-rc2-snapshot.c064673
    Date: 2021-12-15T09:32:43.552Z
    CLI Version: 0.20.2 [13783819]

plampix

Is your feature request related to a problem? Please describe.
Compiling a project for a Digispark works great, however, uploading doesn’t work (it doesn’t do anything if I hit upload). Presumably because the Digispark doesn’t present a ‘port’ to upload to.

Describe the solution you’d like
I’d like to be able to upload a project when there’s no port selected, for hardware that doesn’t upload using a static port.

Describe alternatives you’ve considered
Uploading the .hex from CLI. It works, but would be nice if we could do it from the GUI, like we used to in Arduino 1.x

kittaakos

Describe the problem

Sometimes, the buttons look ugly in the lib install dialog.

Screen Shot 2022-08-10 at 13 32 41

To reproduce

Try to install Adafruit MAX31855 library:1.3.0, it does not look good. The UI scale is 100%.

buttons_install_libs.mp4

Expected behavior

The buttons look OK.

Arduino IDE version

9cabd40

Operating system

macOS

Operating system version

12.3.1

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

per1234

Describe the bug

🐛 The keyboard control for sending data from Serial Monitor was changed from Enter in the classic Arduino IDE to the unintuitive and less convenient Ctrl+Enter in Arduino IDE 2.x

The first time I tried to send data via Serial Monitor, I jumped straight to typing into the input field without bothering to look at the gray text, then spent some time repeatedly pressing «Enter» without any result and hunting around for that «Send» button.

To Reproduce

  1. Connect any Arduino board that presents a serial port to your computer.
  2. Select Tools > Serial Monito from the Arduino IDE menus.
  3. Type some text in the Serial Monitor input field.
  4. Press Enter.
    🐛 Nothing happens.

Expected behavior

Pressing the Enter key while the Serial Monitor input field is selected causes the data to be sent if any is present.

Screenshots

In the Java IDE’s Serial Monitor, sending data is done by typing into the input field and then either pressing «Enter» or clicking the «Send» button:

Unknown.png

In Arduino IDE 2.x, there is a message that explains the unintuitive Ctrl+Enter system to the user:

Unknown-1.png

but that message disappears as soon as you start typing (as it must). The user will expect the field to work in an intuitive manner and not bother to read the text, then once the find it is not working as expected, the text won’t be there to guide them:

Unknown-2.png

Desktop

  • OS: Windows 10
  • Version: 2.0.0-beta.12-nightly.20211021
    Date: 2021-10-21T03:03:16.691Z
    CLI Version: 0.19.1 alpha [718bbbf2]

Additional context

The loss of the Send button (#348) worsens the poor user experience of sending data via Serial Monitor via Arduino IDE 2.x.

Reported at:

  • #348 (incidentally)
  • https://forum.arduino.cc/t/serial-monitor/698844/4
  • https://forum.arduino.cc/t/several-bugs-issues/899081
  • https://forum.arduino.cc/t/ctrl-enter-step-backwards/1013856
  • https://forum.arduino.cc/t/arduino-ide-2-0-0-rc9-input-in-serial-monitor-is-not-working/1015720/4

vipoty

Describe the problem

When I try to use the declarations like uint8_t, uint16_t and so on on the second and further files in a project I have the errors:
error: unknown type name ‘uint8_t’
error: unknown type name ‘uint16_t’

To reproduce

Just add the second file to the project and write something like:
/* Can I use uint16_t and uint8_t here& */
uint16_t a_function(uint8_t a_variable) {
return a_variable * 2;
}

image
image

Expected behavior

uint16_t and uint8_t should be valid type declarations like in the first file in the project.

Arduino IDE version

2.0.0

Operating system

Windows

Operating system version

10

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

bozzerjoseph

Describe the problem

If in this line of writing in the dac I write int in front of valeuraenvoyer .. the sketch is compiled and uploaded into my arduino XIAO without problem

// Calculation of the value corresponding to the desired voltage at the output of the DAC and its shipment
  int Valeuraenvoyer = tensionvoulueensortie * 1024/3.3;

On the other hand if I write «Float» in front «Valeuraenvoyer» .. The sketch is compiled but impossible to upload it
I have this error without any explanation:

Write 44392 bytes to flash (694 pages)

[==] 9% (64/694 pages)
[=====] 18% (128/694 pages)
[======= "27% (192/694 pages)
[==========/36% (256/694 pages)
[============== "(320/694 pages)
[================= "(384/694 pages)
[===================== "(448/694 pages)
[=======================/73% (512/694 pages)
[=========================/82% (576/694 pages)
[============================= "(640/694 pages)
[=============================/100% (694/694 pages)
Done in 0.256 seconds

VERIFY 44392 bytes of flash with checksum.
VERIFY FAILED
Failed Uploading: Uploading Error: Exit Status 2

To reproduce

If I place int i can upload into my arduino….. Immediately I replace it with float and I have a mistake! … Imediatement I put back int and everything is fine … I put it back and I have mistakes again

Expected behavior

I expect to upload my sketch

Arduino IDE version

IDE 2.0.0 date 2022-09-14

Operating system

macOS

Operating system version

Mojave

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

per1234

Describe the bug

From time to time, the IDE exhibits the follow symptoms when I open it:

  • No ports are shown under the IDE’s board/port menu
  • The «Select Board» dialog (accessed via «Select Other Board & Port«) shows «NO PORTS DISCOVERED«
  • The Tools > Port menu is missing

However there are multiple detectable Arduino boards and generic serial ports on my computer and other times when I start the IDE the ports are detected just as expected.

To Reproduce

  1. Start Arduino IDE
  2. Check if ports are listed. If so, then exit IDE and start again at step 1.

Command line looks like this when the issue occurs:

Click to expand

daemon INFO starting discovery builtin:serial-discovery process
daemon INFO starting discovery builtin:mdns-discovery process
daemon INFO started discovery builtin:serial-discovery process
daemon INFO sending command HELLO 1 "arduino-cli 0.19.1" to discovery builtin:serial-discovery
daemon INFO started discovery builtin:mdns-discovery process
daemon INFO sending command HELLO 1 "arduino-cli 0.19.1" to discovery builtin:mdns-discovery
daemon INFO from discovery builtin:serial-discovery received message type: hello, message: OK, protocol version: 1
daemon INFO from discovery builtin:mdns-discovery received message type: hello, message: OK, protocol version: 1
daemon INFO sending command START_SYNC to discovery builtin:serial-discovery
daemon INFO sending command START_SYNC to discovery builtin:mdns-discovery
daemon INFO from discovery builtin:mdns-discovery received message type: start_sync, message: OK
daemon INFO from discovery builtin:serial-discovery received message type: start_sync, message: OK
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM3
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM255
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM1
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM7
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM6
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM254
root WARN Frontend EditorNavigationContribution.onStart is slow, took: 6466.7 ms
root WARN Frontend WorkspaceService.onStart is slow, took: 175.1 ms
root INFO Changed application state from 'init' to 'started_contributions'.
root INFO Changed application state from 'started_contributions' to 'attached_shell'.
root INFO >>> Restoring the layout state...
root INFO [hosted-plugin: 6156] PLUGIN_HOST(6156) starting instance
root INFO [8115205c-c018-490d-b338-36be2ff33303] Sync of 5 plugins took: 512.1 ms
root ERROR Could not restore layout
root INFO Changed application state from 'attached_shell' to 'initialized_layout'.
root INFO [8115205c-c018-490d-b338-36be2ff33303][marus25.cortex-debug]: Loaded contributions.
root INFO [8115205c-c018-490d-b338-36be2ff33303][arduino.vscode-arduino-tools]: Loaded contributions.
root INFO [8115205c-c018-490d-b338-36be2ff33303][vscode.cpp]: Loaded contributions.
root INFO [8115205c-c018-490d-b338-36be2ff33303][vscode.json]: Loaded contributions.
root INFO [8115205c-c018-490d-b338-36be2ff33303][vscode.json-language-features]: Loaded contributions.
root INFO [8115205c-c018-490d-b338-36be2ff33303] Load contributions of 5 plugins took: 145.0 ms
root WARN Frontend EditorPreviewTreeDecorator.onDidInitializeLayout is slow, took: 146.0 ms
root WARN 'cpp' language is remapped from 'source.cpp.embedded.macro' to 'source.cpp' scope
root WARN a registered grammar configuration for 'cpp' language is overridden
root INFO [hosted-plugin: 6156] PLUGIN_HOST(6156): PluginManagerExtImpl/init()
root INFO [hosted-plugin: 6156] PLUGIN_HOST(6156): initializing(cortex-debug@0.3.10 with C:ide 2arduino-ide_2.0.0-beta.11-snapshot.846c22c_Windows_64bitresourcesappnode_modules@theiaplugin-ext-vscodelibnodeplugin-vscode-init)
root INFO [hosted-plugin: 6156] Debugger contribution has been registered: cortex-debug
root INFO [hosted-plugin: 6156] PLUGIN_HOST(6156): initializing(vscode-arduino-tools@0.0.1-beta.1 with C:ide 2arduino-ide_2.0.0-beta.11-snapshot.846c22c_Windows_64bitresourcesappnode_modules@theiaplugin-ext-vscodelibnodeplugin-vscode-init)
root INFO [hosted-plugin: 6156] PLUGIN_HOST(6156): initializing(cpp@1.52.1 with C:ide 2arduino-ide_2.0.0-beta.11-snapshot.846c22c_Windows_64bitresourcesappnode_modules@theiaplugin-ext-vscodelibnodeplugin-vscode-init)
root INFO [hosted-plugin: 6156] PLUGIN_HOST(6156): initializing(json@1.46.1 with C:ide 2arduino-ide_2.0.0-beta.11-snapshot.846c22c_Windows_64bitresourcesappnode_modules@theiaplugin-ext-vscodelibnodeplugin-vscode-init)
root INFO [hosted-plugin: 6156] PLUGIN_HOST(6156): initializing(json-language-features@1.46.1 with C:ide 2arduino-ide_2.0.0-beta.11-snapshot.846c22c_Windows_64bitresourcesappnode_modules@theiaplugin-ext-vscodelibnodeplugin-vscode-init)
root INFO [hosted-plugin: 6156] PLUGIN_HOST(6156): PluginManagerExtImpl/loadPlugin(C:ide 2arduino-ide_2.0.0-beta.11-snapshot.846c22c_Windows_64bitresourcesapppluginsvscode-builtin-json-language-featuresextensionclientdistjsonMain)
root INFO [hosted-plugin: 6156] PLUGIN_HOST(6156): PluginManagerExtImpl/loadPlugin(C:ide 2arduino-ide_2.0.0-beta.11-snapshot.846c22c_Windows_64bitresourcesapppluginsvscode-arduino-toolsextensiondistbundle)
root INFO Changed application state from 'initialized_layout' to 'ready'.
root INFO [8115205c-c018-490d-b338-36be2ff33303][marus25.cortex-debug]: Started plugin.
root INFO [8115205c-c018-490d-b338-36be2ff33303][arduino.vscode-arduino-tools]: Started plugin.
root INFO [8115205c-c018-490d-b338-36be2ff33303][vscode.cpp]: Started plugin.
root INFO [8115205c-c018-490d-b338-36be2ff33303][vscode.json]: Started plugin.
root INFO [8115205c-c018-490d-b338-36be2ff33303][vscode.json-language-features]: Started plugin.
root INFO [8115205c-c018-490d-b338-36be2ff33303] Start of 5 plugins took: 914.5 ms

(note that the ports were discovered even though not shown in the IDE)

Command line looks like this when the issue does not occur:

Click to expand

daemon INFO starting discovery builtin:serial-discovery process
daemon INFO starting discovery builtin:mdns-discovery process
daemon INFO started discovery builtin:serial-discovery process
daemon INFO sending command HELLO 1 "arduino-cli 0.19.1" to discovery builtin:serial-discovery
daemon INFO started discovery builtin:mdns-discovery process
daemon INFO sending command HELLO 1 "arduino-cli 0.19.1" to discovery builtin:mdns-discovery
daemon INFO from discovery builtin:serial-discovery received message type: hello, message: OK, protocol version: 1
daemon INFO from discovery builtin:mdns-discovery received message type: hello, message: OK, protocol version: 1
daemon INFO sending command START_SYNC to discovery builtin:serial-discovery
daemon INFO sending command START_SYNC to discovery builtin:mdns-discovery
daemon INFO from discovery builtin:mdns-discovery received message type: start_sync, message: OK
daemon INFO from discovery builtin:serial-discovery received message type: start_sync, message: OK
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM3
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM255
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM1
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM14
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM7
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM254
root WARN Frontend EditorNavigationContribution.onStart is slow, took: 5815.9 ms
root WARN Frontend WorkspaceService.onStart is slow, took: 180.9 ms
root INFO Changed application state from 'init' to 'started_contributions'.
root INFO Changed application state from 'started_contributions' to 'attached_shell'.
root INFO >>> Restoring the layout state...
root INFO [hosted-plugin: 12360] PLUGIN_HOST(12360) starting instance
root INFO Attached boards and available ports changed:
root INFO  - New port is available on COM255
root INFO ------------------------------------------
root INFO [3d74c3ec-e34f-45d3-9f3b-f98baa68c6de] Sync of 5 plugins took: 582.2 ms
root INFO Attached boards and available ports changed:
root INFO  - New port is available on COM1
root INFO ------------------------------------------
root ERROR Could not restore layout
root INFO Attached boards and available ports changed:
root INFO  - Attached board: Arduino MKR WiFi 1010 [arduino:samd:mkrwifi1010] on COM14
root INFO ------------------------------------------
root INFO Attached boards and available ports changed:
root INFO  - Attached board: Arduino Mega or Mega 2560 [arduino:avr:mega] on COM7
root INFO ------------------------------------------
root INFO Changed application state from 'attached_shell' to 'initialized_layout'.
root INFO [3d74c3ec-e34f-45d3-9f3b-f98baa68c6de][marus25.cortex-debug]: Loaded contributions.

Expected behavior

All connected ports and boards are always shown in the IDE.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • Version: 2.0.0-beta.11-snapshot.846c22c
    Date: 2021-10-06T15:50:55.015Z
    CLI Version: 0.19.1 alpha [718bbbf2]

Additional context

Possibly related:

  • #365
  • #540
  • https://forum.arduino.cc/t/not-possible-to-setup-a-coms-port-for-uploading-sketch/918369

Unfortunately, the issue occurs intermittently (maybe once every 10 open/close cycles) and I have not been able to identify any pattern to its occurrence. I have not noticed any correlation with

I have never had this problem with the Java IDE, even when I check it at the same time IDE2 is failing.

image.png

Thanks to a tip from @RudolfAtHome, I learned that new ports are still discovered when the IDE is in this condition, including previously unrecognized ports after disconnecting and then reconnecting the board.

nbourre

Describe the problem

After following the instructions to compile Arduino IDE under Windows, I stumbled on this error after running yarn.

arduino-ide-extension: <<< Checked out c8ff042.
arduino-ide-extension: >>> Building the CLI...
arduino-ide-extension: 'task' is not recognized as an internal or external command,
arduino-ide-extension: operable program or batch file.
arduino-ide-extension: error Command failed with exit code 1.
arduino-ide-extension: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
arduino-ide-extension: error Command failed with exit code 1.
arduino-ide-extension: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run prepare exited 1 in 'arduino-ide-extension'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

I’m unable to compile this project.

To reproduce

Call yarn in the Arduino IDE source code folder.

Expected behavior

Everything works until next step.

Arduino IDE version

Arduino IDE source code

Operating system

Windows

Operating system version

10.0.22623.741

Additional context

It’s not a software bug but missing information in the developer guide.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

per1234

Describe the request

Find some way to retain the installation interface of the target item when using the version menu in Library Manager and Boards Manager.

🙂 Library and Boards Manager will be easier and more pleasant to use.

Describe the current behavior

The IDE’s Library Manager and Boards Manager list the available libraries and boards platforms.

When the mouse pointer is hovered over one of the list items, an «INSTALL» button as well as a version menu for items that have multiple releases are added at the bottom of the item.

The version menu is a dropdown, which overlaps the next item on the list. This means that the mouse pointer is hovering over the coordinates of the next item when selecting a different version from the menu.

🙁 After selecting a version from the menu, the installation interface of the target item is lost and the installation interface for the next item on the list opens instead. Even though I am very experienced using the IDE, I still find myself accidentally installing the wrong library or simply feeling confused by the unexpected change in the interface when I use this menu. This makes me suspect that it will be a poor user experience for those who are less experienced.

version-menu

Arduino IDE version

2.0.0-rc9.4

Operating system

Windows, Linux

Operating system version

Windows 10, Ubuntu 20.04

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest nightly build
  • My request contains all necessary details

integrated-circuit

Describe the problem

When i’m trying to flash the uf2 file to the pico, i get this error:
Le croquis utilise 89824 octets (4%) de l’espace de stockage de programmes. Le maximum est de 2097152 octets.
Les variables globales utilisent 42824 octets (15%) de mémoire dynamique, ce qui laisse 227512 octets pour les variables locales. Le maximum est de 270336 octets.
…………………
Failed uploading: uploading error: exit status 1.
and here is a screenshot of my screen:
image

Im using the right board plugin for th pico as you can see:
image

To reproduce

1)Connect the pico to the PC
2) Open this example file:
Blink.zip
3)Verify the sketch
4)Upload the sketch to the pico

Expected behavior

The pico LED should blink after upload

Arduino IDE version

Version: 2.0.1-nightly-20221012Date: 2022-10-12T03:46:53.546Z Version CLI: git-snapshot [c8ff0425]Copyright © 2022 Arduino SA

Operating system

Linux

Operating system version

ubuntu 22.04

Additional context

Exported UF2 Binaries from IDE 2.0 stable and nightly just work OOTB

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

lilbuzz

Describe the problem

When I add «Sketches» to the default Sketchbook location in the preferences, I see the following error when I attempt to compile the project:
C:Users<username>DocumentsArduinoSketchessketchnamesketchname.ino:35:34: fatal error: UniversalTelegramBot.h: No such file or directory
compilation terminated.

exit status 1

Compilation error: UniversalTelegramBot.h: No such file or directory

To reproduce

(include UniversalTelegramBot library)
Open File-Preferences
Add Sketches to the Sketchbook location, and click OK.
Compile project

Expected behavior

Library should be found, and compile should work.
If I remove «Sketches» from the Sketchbook location, my projrct compiles correclty, even though the project is in the DocumentsArduinoSketches folder.

Arduino IDE version

2.0.0

Operating system

Windows

Operating system version

11

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

ceptimus

Describe the problem

When editing a sketch, cursor randomly jumps to start of next line. Sometimes, indenting goes haywire — as though the IDE self-inserts a newline, followed by one or more backspaces. I’ve not noticed it randomly deleting characters I’ve already typed, however.
Also, (noticable by selecting a block) there is lots of trailing whitespace, probably tabs, at the ends of lines.
No problems on the same PC using IDE 1.8.19, nor with other non-Arduino applications and text editors.

I’ve seen reports of this issue, but from a year or more ago, and they were closed.

To reproduce

Try running the IDE under Linux Mint Cinnamon, current latest version.

Expected behavior

You may see the IDE auto-inserting characters — though I suppose it may also only do it on some PCs.

Arduino IDE version

2.0.0 Date 2022-09-14T07:05:28.855Z CLI Version 0.27.1 [a900cfb2]

Operating system

Linux

Operating system version

Linux Mint 21 Cinnamon 5.4.12

Additional context

Intel Core i7-7740X 16GB RAM, NVIDIA GeForce GTX 1080 graphics card

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

akash73

Describe the bug
At the first launch, the built in examples and the library examples menu is correctly shown.
after selecting a random sketch from the examples list, then the menu shows only the built in examples

To Reproduce
Steps to reproduce the behavior:

  1. Go to File -> Examples (all examples are displayed)
  2. Click on any examples
  3. Go to File -> Examples (only built-in examples are displayed)

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: MACOS
  • Version: [10.15.7]

First launch

Schermata 2021-03-23 alle 13 13 29

same manu after opening any sketch

Schermata 2021-03-23 alle 13 13 57

OS details

Schermata 2021-03-24 alle 11 11 32

hasenradball

Describe the problem

I use the Arduino IDE 2.0 and switche to German.

But I saw only some Menu items was switched to german…
Half of the Menu ites in english, halb of menue item in german…
It makes not a good picture.
It seems that the software has some problems.

To reproduce

Just try it

Expected behavior

All menue items are switched to the corresponding language.

Arduino IDE version

2.0.0

Operating system

macOS

Operating system version

latest

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

AlbyIanna

Describe the problem

Sometimes, if you have a selected board that belongs to a platform and you try to uninstall that platform, the IDE will stop to work. No useful feedback is given, the platform will appear to be installed and any action you perform that uses the backend (like compiling a sketch, creating a new file or updating a library) will fail. Quitting the IDE and reopening it will show that the platform has actually been uninstalled.

error-uninstalling-libraries.mov

To reproduce

I wasn’t able to reproduce it consistently because sometimes it works just fine, but repeating the steps a few times would always lead to the reported error.

  1. Open the Boards Manager from Tools > Board > Boards Manager…
  2. Search and install the Arduino MBED OS Nano Boards platform (only if you don’t have it already installed)
  3. Select the Arduino Nano RP2040 Connect from Tools > Board > Arduino MBED OS Nano Boards > Arduino Nano RP2040 Connect
  4. From the Boards Manager, UNINSTALL the Arduino MBED OS Nano Boards
  5. 😢 Output in the console says boards are uninstalled, but the Arduino MBED OS Nano Boards in the Boards Manager still looks installed and the menu item Arduino MBED OS Nano Boards is still present in the Tools > Board menu. Also major IDE features will stop working.

Expected behavior

  1. Open the Boards Manager from Tools > Board > Boards Manager…
  2. Search and install the Arduino MBED OS Nano Boards platform (only if you don’t have it already installed)
  3. Select the Arduino Nano RP2040 Connect from Tools > Board > Arduino MBED OS Nano Boards > Arduino Nano RP2040 Connect
  4. From the Boards Manager, UNINSTALL the Arduino MBED OS Nano Boards
  5. 😸 Output in the console says boards are uninstalled, and the IDE won’t stop working

Arduino IDE version

2.0.1-nightly-20221006

Operating system

macOS

Operating system version

12.3.1 (21E258)

Additional context

This bug never happened to me when I had a selected board from a different platform.

Also, I want to make clear that this bug didn’t happen consistently to me, sometimes I met the expected behaviour, sometime I didn’t.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

marc0777

Describe the problem

CPU and memory usage continuously increase while using the IDE. CPU usage seems to settle at around 25% and never go over, while memory usage doesn’t seem to have an upper limit.

Moreover memory usage varies a lot by the second:

ard
:

To reproduce

While I wasn’t able to find a specific triggering event, this doesn’t seem to be related to building or uploading, opening new tabs or any other single action.

Instead, it resource usage continuously increase as I edit the code. Keeping the IDE open while just reading the code, compiling and uploading doesn’t trigger this behaviour, but after some minutes writing code the IDE starts to feel slower and slower, as resource usage grows.

Expected behavior

Resource usage should only be noticeable during initial indexing, compilation and upload. Instead it should be very low while editing the code itself.

Arduino IDE version

nightly-20220615

Operating system

Windows

Operating system version

11 21H2

Additional context

This issue is been present since at least rc6, and is present on rc7 as well.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

strickce

Describe the bug
When I try to edit a keymapping, the input window does not allow me to change the contents.

To Reproduce
Steps to reproduce the behavior:

  1. Go to ArduinoIDE/Advanced/Keyboard Shortcuts
  2. Click on any item
  3. The edit window is shown
  4. Try to type into the field (cannot)
  5. Clear the input area, then try to type (still cannot)

Expected behavior
The input area should be enabled for text input.

Screenshots
Not needed.

Desktop (please complete the following information):

  • OS: MacOS
  • Version: [12.0.1] Monterey

Additional context
None.

RalphBacon

Using Arduino IDE 2.0.0 the USB-attached Arduino UNO clone is reset upon starting up, or shutting down the IDE.

Might be related to issue arduino/Arduino#11824.

Running Windows 11, Arduino IDE 2.0.0

wittend

Describe the problem

The Save and Upload buttons are missing on the 2.0.0 rc9 toolbar! This is a critical error, whether it is intentional or otherwise.
As a disabled individual, I am completely unacceptable! I am at the mercy of the mouse. Keyboard shortcuts will not suffice.

To reproduce

Just look at any schetchbook.

Expected behavior

The Save and Upload buttons should be in the toolbar.

Arduino IDE version

2.0.0 rc9 zip

Operating system

Linux

Operating system version

20.1

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

данная тема достаточна обширна, и сложно будет её за раз выложить в готовом виде. Подготовка и исправление материалов занимает очень много времени (которого свободного у меня нет в должном количестве), и поэтому прошу модераторов дать мне отсрочку, хотя бы в неделю, для последовательного пополнения. Желательно закрепить еще 2 первых поста для дополнительной сопутствующей информации. Спасибо.
В прошлом я был создателем одной из прошивок Лампы Гайвера и материалы выкладывал на страницах этого форума. В какой-то момент проект был полностью переработан и адаптирован для новых задач, о которых я хотел бы писать на этих страницах. Месяца 2 назад мне потребовалось сделать прошивку для управления светодиодной лентой. Используя старые наработки и желание сделать общий алгоритм работы и управления, полностью переделал код. На данный момент разработка представляет собой управление ёлочной гирляндой (как ни странно Новый Год на носу) — это была моя самая давняя мечта, и я планирую осуществить ее до конца этого года. А так как программа была «поломана», то восстановление функционала Лампы Гайвера на новом «движке» это уже следующий этап. Итак…


LEDraw Project: платформа для светодиодной графики / расширение возможностей FastLED

LEDraw Project — это

платформа

для светодиодной графики базирующаяся на популярной библиотеке управления адресными светодиодными лентами FastLED. Основное назначение этой платформы, как ни странно, это экономия ресурсов контроллера при повышении качества выводимой «картинки». На данный момент включает в себя набор объектов с оптимизированной структурой для иерархичного доступа к ресурсам котроллера, а также ряд высокопроизводительных графических функций для рисования эффектов. В дополнении, имеется еще ряд полезных и совместимых модулей расширяющих функционал этой платформы, таких как управление кнопкой, полноцветные индикаторы (адресные светодиоды находящиеся в цепочке, но не участвующие в прорисовке основного эффекта, служащие, например, для индикации режима, уровня сигнала и пр.), управление питанием и яркостью…

Примеры реализации проекта LEDraw:
LEDraw stripe — 144LEDs, 1D-graphix, faders, 1D-OSD

LEDraw garland (гирдянда) — 249LEDs, 1D-graphix, faders, 1 inLED-indicator

LEDraw Disco-Lamp — 32LEDs, 1D-graphix, faders, 1 LED-indicator, 1 Aux driver (motor)

Схема подключения:

Base.png

Замечено, что такая схема выдерживает подключение 100-150 стандартных адресных светодиодов без проблем от стандартной USB зарядки на 2А (при условии выставления соответствующего тока в конфигурации)! Резистор 150 Ом желателен, но не обязателен в случае если лента не работает.

Схема подключения дополнительного исполнительного устройства (моторчик, или бэкграунд подсветка):

AuxDrive.png

Рабочие конфигурации:
№9 — полоска из светодиодов ws2012b
№10 — дисколампа на ws2012b
№11 — гирлянда на ws2011

При работе над эффектами было замечено, что многие из них начинали вести себя совершенно другим образом, когда менялось, например, количество светодиодов. Либо появлялась дискретность изображения, либо эффект замедлялся(ускорялся) до нежелательных скоростей, а иногда картинка переворачивалась, и приходилось лезть в код, чтобы разобраться с неведомыми параметрами, чтобы привести все в норму. А иногда эффект сильно тормозил весь процесс, пересчитывая «тяжелые» или излишние кадры. В данной платформе появился некий интерфейс между процедурой отрисовки эффекта и программой управления (менеджером), что позволило сократить количество ресурсов занимаемых у контролера без потери качества самой отрисовки. Более того, повысилась плавность и четкость отрисовки благодаря использованию легких и понятных графических функций (словно как в Бэйсике — Draw, Line, Plot…)

Объекты LEDraw — функционально законченные и оптимизированные модули, позволяющие удобно их использовать в своих разработках. Написаны в виде структур, а не классов, что позволяет более рационально использовать ресурсы контроллеров. В частности, все методы в структурах единожды описываются в памяти при компиляции (являются общими), а не дублируются как в классах без усложнения кода.

Статический объект effect описывает все для необходимого для отображения эффекта.

  • Переменные и свойства:
    • *current — указатель на свойства текущего эффекта
    • uint8_t speed — полное значение регулятора скорости
    • uint8_t scale — полное значение регулятора скорости
    • timer — объект внутреннего счетчика времени. Используется для отсчета скорости смены кадров, или таймер смены эффектов
    • *leds — указатель на массив памяти (светодиоды), с которым работает данный эффект
    • int8_t/int16_t i — универсальная переменная, индекс используемый текущим эффектом для внутренних целей
    • int8_t/int16_t indexes[ ] — универсальная масштабируемая переменная используемая текущим эффектом для внутренних целей
    • CRGB colors[ ] — универсальная масштабируемая переменная используемая текущим эффектом для внутренних целей
    • A, B, C, D — универсальные переменные используемые текущим эффектом для внутренних целей. Каждая занимает всего лишь 4 байта, но может использоваться как 4 однобайтные переменные, 2 — двухбайтные, как 1 четырехбайтная, или быть представлена как RGB цвет
    • rgb16_palette/g_palette — универсальная переменная для описания текущей палитры
  • Методы:
    • bool hasChangedEffect() — возвращает сбрасываемый признак смененного эффекта
    • bool hasChangedParams() — возвращает сбрасываемый признак изменённых параметров Speed, Scale, Bright
    • bool hasChangedSpeed() — возвращает сбрасываемый признак изменённого параметра Speed (Скорость)
    • bool hasChangedScale() — возвращает сбрасываемый признак изменённого параметра Scale (Масштаб)
    • bool set(effect)— устанавливает эффект текущим. Возвращает признак успешного выполнения операции
      • effect — индекс (uint8_t) эффекта из списка effects_array[ ]
    • void setPalette(&palette)— установка текущей (рабочей) палитры эффекта
      • &palette — адрес обычной RGB16(TProgmemRGBPalette16Ptr), или градиентной палитры (TProgmemRGBGradientPalettePtr)
    • bool tick() — прорисовка «кадра» эффекта. Возвращает true, если кадр изменился
    • CRGB ColorFromPalette(index, brightness, blendType) — локальная реализация функции для работы с текущей палитрой
    • void fill_palette(N, startIndex, incIndex, brightness, blendType) — локальная реализация функции для работы с текущей палитрой

  • Переменные и свойства описания эффекта:
    • uint8_t id — индекс текущего эффекта
    • bool *action(&effect)— указатель на процедуру прорисовки кадра. Возвращает признак непустого кадра
      • &effect — ссылка на параметры передаваемые в процедуру эффекта

LEDraw позволяет с легкостью конфигурировать несколько родственных проектов со своими настройками. Осные настройки находятся в файле config.h. Дополнительные кастомные настройки в своем конфигурационном файле находящимся в корне проекта. Смысл заключается в том, что кастомный конфигурационный файл переписывает необходимые установки define под конкретную реализацию проекта.

Первоначально эффекты работали с 8 палитрами, но в процессе адаптации появилась возможность работать с градиентными(!) палитрами, коих в коллекции насчитывается уже 34 шт.

  • Кнопка — Да
  • Демо-режим — Да (в минимальной конфигурации)
  • Индикаторы — Частично
  • Регуляторы (интеллектуальное управление кнопкой + визуализация) — Частично
  • AuxDrive (моторчик, одноцветная LED лента…) — Да
  • Дизеринг — Да
  • Фаворитные списки — Нет
  • Пульт — не отлажен
  • Фэйдеры эффектов — Да
  • Анимационные фэйдеры — Да
  • WiFi — не отлажен

Button: — v.2.0.01γ (01.12.2020)
Алгоритм управления кнопкой

Действие по умолчению (если не выполнено другое):
— / удержание — регулировка глобальной яркости
*- / 1 + удержание — … скорости эффекта
**- / 2 + удержание — … масштаба эффекта
***- / 3 + удержание — регулировка яркости эффекта (для проектов с моторчиком — скоростьего вращения)

Из профиля OFF/SLEEP:
* / 1 кратное нажатие — показ часов (если установлена соответствующая настройка, и при работе в режиме клиента). Повторное нажатие во время показа — переход в режим ON
** / 2 кратное нажатие — переход в режим LAMP
*** / 3 кратное нажатие — смена бэкграунда режима OFF
**** / 4 кратное нажатие — переход в режим DEMO
***** / 5 кратное нажатие — вывод интернет имени лампы и текущего IP (если поддерживается)
****** x2 / 6 кратное нажатие — прошивка по OTA (после 2-кратного входа в этот режим. Переключится на эффект Матрица) (если поддерживается)
******* / 7 кратное нажатие — смена режима ESP — точка доступа/клиент (если поддерживается)
******** / 8 кратное нажатие — сброс настроек эффектов

Из профиля ON:
* / 1 кратное нажатие — показ часов (при работе в режиме клиента). Повторное нажатие во время показа — переход в режим OFF
** / 2 кратное нажатие — смена эффекта вперед
*** / 3 кратное нажатие — смена эффекта назад
**** / 4 кратное нажатие — переход в режим PAINT >> ON >> PAINT… (если поддерживается)
***** / 5 кратное нажатие — вывод FPS — количества кадров в секунду (если поддерживается)
******** / 8 кратное нажатие — сброс настроек текущего эффекта

Из профиля LAMP:
* / 1 кратное нажатие — выключение лампы
** / 2 кратное нажатие — переход в режим ON
*** / 3 кратное нажатие — смена эффекта лампы

Из профиля DEMO:
* / 1 кратное нажатие — переход в режим OFF
** / 2 кратное нажатие — переход в режим ON
*** / 3 кратное нажатие — смена режима демо (Последовательное/Случайное/просмотр градиентов)
***** / 5 кратное нажатие — вывод текущего периода смены эффектов (в секундах)
*- / 1 + удержание — … периода смены эффектов (10сек — 2 минуты)

Режим удержания работает по такому принципу:
Для регулировки соответствующего параметра нужно удерживать кнопку на определенное время, пока не отобразится соответствующий индикатор.
Когда регулируемое значение дойдет до своего минимального значения, то при дальнейшем удерживании кнопки через 1,5с оно будет изменяться в обратную сторону. Если при отпускании кнопки быстро нажать ее повторно, то произойдет вход в предыдущий режим установки.
Если в течении 0,75с произойдет повторное нажатие, то «разворота» приращения регулировки не произойдет, тем самым можно будет легко сделать точную подстройку регулируемого параметра.

Код проекта: (на данный момент доступен как готовое решение для платформы Wemos D1 mini)

= перелопачен принцип управления графикой. Введен новый модель graphix, который объединяет параметры вывода на ленту и быстрые функции прорисовки графики.
Теперь можно определить отдельные пространства на ленте, и с каждым независимо работать не прибегая к чрезмерному описанию параметров.
Доступны такие функции одномерной графики:
— inRange(*) — проверка адреса пикселя на нахождения в своих границах
— wrap(*) — функции «оборачивания» координаты относительно границ
— crop(*) — функции «обрезания» координаты относительно границ
— mirror(*) — функции «отражения» координаты относительно границ
— getPixelValue(*) — функция получения цвета пикселя по его номеру
— getPixelBright(*) — функция получения яркости пикселя по его номеру
— getColor(*) — получение цвета пикселя по его номеру
— blurAll(*) — размытие всего диапазона пикселей
— blend_fast(*) — получение промежуточного цвета относительно двух заданных
— drawPixel() / drawPixel_safe() — прорисовка пикселя (+безопасная)
— dimRange() / dimRange_safe() — затемнение отрезка (+безопасная)
— fillRange() / fillRange_safe() — прорисовка отрезка (+безопасная)
— fillSegment() / fillSegment_safe() — прорисовка отрезка простым градиентом
— noiseAll(*) — заполнение дискретным шумом всего диапазона
— fillAll(*) — заполнить цветом весь диапазон
— dimAll(*) — затемнить весь диапазон
— clearAll(*) — очистить всё
прорисовка графических примитивов (1d):
— drawSparkler(*) — прорисовка «бенгальского огня»
— drawComet(*) — прорисовка кометы

v2.2.15β (30.12.2022) Скачать/Download

Установка:

  • PlatformIO, все как обычно — распаковываем архив в новую папку, открываем, компилируем…
  • Arduino IDE: требуется перенести библиотеки из /lib в C:Users*******DocumentsArduinolibraries. По крайней мере папочку /LEDraw если там уже есть последние GButton и FastLED. Для установки — кликаем файл srcsrc.ino и только на этой вкладке запускаем сборку.

Понравилась статья? Поделить с друзьями:
  • Upload error code 5 алиэкспресс
  • Upload error arduino
  • Upload an unexpected error occurred please try again later
  • Uplaycrashreporter exe initialization error 1
  • Uplay как изменить аватар