Содержание
- «Compilation error: Error: 2 UNKNOWN: exit status 1» error message is unnecessarily cryptic #151
- Comments
- Compilation error: Error: 2 UNKNOWN: no FQBN provided while board is in and plugged #421
- Comments
- steps
- Make error message from compiling w/o board selected more user friendly #62
- Comments
- Describe the current behavior
- To reproduce
- Describe the request
- Desktop
- Additional context
- Related
- Arduino Digispark support #364
- Comments
«Compilation error: Error: 2 UNKNOWN: exit status 1» error message is unnecessarily cryptic #151
Describe the bug
Any program I run and attempt to compile I get this error:
c:/users/anton/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib/avr5/crtatmega328p.o:(.init9+0x0): undefined reference to `main’
collect2.exe: error: ld returned 1 exit status
Compilation error: Error: 2 UNKNOWN: exit status 1
- I recently got the beta and no matter what I do I had this (yes I restarted my pc) and I even download the latest Git (2.30.1) 64-bit.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected for the code to compile.
Desktop (please complete the following information):
- OS: Windows 10 Pro 64-bit
- Version: 2.0.0-beta3
Additional context
This could be due to from when some notification occurred which I couldn’t figure out what it was for. I do remember that it led to this link. However, I don’t see this notification anymore?
The text was updated successfully, but these errors were encountered:
I have the same error. I installed first DallasTemperature library from library manager, and for OneWire library I do the same.
After that I tried compile code at the bottom of the page.
But it ending with Error 2 UNKNOWN: exit status 1.
After that I installed manually libraries from .zip archives. (that works for me for old IDE). The same error.
My OS is Ubuntu 20.10
I have the same error. I installed first DallasTemperature library from library manager, and for OneWire library I do the same.
After that I tried compile code at the bottom of the page.
But it ending with Error 2 UNKNOWN: exit status 1.
After that I installed manually libraries from .zip archives. (that works for me for old IDE). The same error.
My OS is Ubuntu 20.10
I see. I’m not sure if it is due to libraries, I still get this error even from examples without library (File>Examples>Basics>Blink) still causes this error yet there are no libraries?
I have the same error. I installed first DallasTemperature library from library manager, and for OneWire library I do the same.
After that I tried compile code at the bottom of the page.
But it ending with Error 2 UNKNOWN: exit status 1.
After that I installed manually libraries from .zip archives. (that works for me for old IDE). The same error.
My OS is Ubuntu 20.10
I see. I’m not sure if it is due to libraries, I still get this error even from examples without library (File>Examples>Basics>Blink) still causes this error yet there are no libraries?
For Blink example from Basic folder of examples I have that error:
Compilation error: Error: 2 UNKNOWN: no FQBN provided
@TheAnton205 @Pioxis
have you installed any cores?
which board have you selected?
If the platform for the selected board is not installed you should get prompted to install it.
please try to manually add support for your board via the boards manager on the left sidebar or from the «Tools > Board > Boards Manager» menu
which board have you selected?
If the platform for the selected board is not installed you should get prompted to install it.
please try to manually add support for your board via the boards manager on the left sidebar or from the «Tools > Board > Boards Manager» menu
Additionally I get that info from my terminal, when Error appeared:
When I first opened program I was prompted for select the board. I selected for Arduino UNO.
I have installed Arduino AVR Boards by Arduino, version 1.8.3
which board have you selected?
If the platform for the selected board is not installed you should get prompted to install it.
please try to manually add support for your board via the boards manager on the left sidebar or from the «Tools > Board > Boards Manager» menu
For me I solved it by reinstalling the beta IDE and by reinstalling Arduino AVR Boards by Arduino, version 1.8.3
Everything seems working now, thanks.
Same issue here. A program that easily compiles and runs under the old IDE gets:
collect2.exe: error: ld returned 1 exit status Using library IRremote at version 3.0.3 in folder: C:UsersccblandDocumentsArduinolibrariesIRremote Compilation error: Error: 2 UNKNOWN: exit status 1
when compiled with V2. No other discernable complaints when using verbose mode on compile.
I did uninstall/reinstall IDE 2.0 to no avail.
Here’s my program
I think this is a case of bad error messages. I got the error too, «Compilation error: Error: 2 UNKNOWN: exit status 1» in the output window. I started the program from the console, and there I see:
daemon INFO compilation terminated. root ERROR Request compile failed with error: 2 UNKNOWN: exit status 1″>
If I install the servo lib everything is fine, so the error message in the output window is wrong.
daemon INFO compilation terminated. root ERROR Request compile failed with error: 2 UNKNOWN: exit status 1 If I install the servo lib everything is fine, so the error message in the output window is wrong. — You are receiving this because you commented. Reply to this email directly, view it on GitHub , or unsubscribe .
I started the program from the command prompt in Linux. You can do the same with Windows Powershell . You go to the program installation folder and run the program by entering it’s name. Then you see all log messages directly.
Same issue here. Win 10 Pro 64 bits. Arduino Uno, Core installed (as suggested by the IDE itself). Can’t compile anything, same error message.
Same error here, opening a detailed issue about it now.
Same error here, but like @bphermansson, when I compiled with verbose, I saw the the error comes from a lacking library.
Add the library and everything is working fine.
upgrading to Arduino IDE v2.0.0 beta 9 worked for me
I had this error specifically when I added
I’m using a Dell XPS, Windows 10
Arduino IDE
Version:2.0.0-beta.10
Date: 2021-08-05T08:23:32.577Z(1 week ago)
CLI Version:0.18.3 alpha [d710b642]
Out or the blue, I couldn’t compile anymore!
Now, as soon as I restart Arduino IDE, I get this message:
«Plugin runtime crashed unexpectedly, all plugins are not working, please reload the page. If it doesn’t help, please check Theia server logs.»
Wen trying to compile, «Compilation error: Error: 2 UNKNOWN: exit status 1».
So, I’ve update the board’s extension to esp32 by Espressif Systems V1.0.6, getting
«Compilation error: Error: 2 UNKNOWN: exit status 1».
Then, after changing it to esp32 by Espressif Systems V1.0.5, the error became:
«bash: line 0: [: /Users/cirobruno/Documents/Arduino/Testes: binary operator expected
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file . target_directory
Compilation error: Error: 2 UNKNOWN: exit status 64″.
Back to esp32 by Espressif Systems V1.0.4, same thing again!
What to do now?
Maybe I should migrate to VSCode.
Источник
Compilation error: Error: 2 UNKNOWN: no FQBN provided while board is in and plugged #421
This may be a duplicate of #151 in which case feel free to close. But it may be another issue (see the «greyed board problem lower down).
host OS: Ubuntu 20.04
ide version etc: installed today from your pages:
steps
- I installed a board (in my case, the sparkfun apollo3 boards, by adding their board manager url to the preferences URLs list, and then installing from the boards manager). The boards seem to be well present and installed, see the screenshot:
- I plugged in the board inside my computer, it is recognized and shows up on the ttyUSB0; I choose the right board and port. One thing seems strange there though, the board name is greyed out. See screenshot:
- From now on, I get the «message 2 FQBN» issue, see screenshot.
Any idea what causes that?
The text was updated successfully, but these errors were encountered:
Hi @jerabaul29. Do you see the boards listed under the Arduino IDE’s Tools > Board > Sparkfun Apollo3 Boards menu?
No, I do not see the boards there, see screenshot:
However in the board manager these boards appear as installed:
Please post the output you get in the Linux terminal after starting the Arduino IDE.
(just launching as $ ./arduino-ide .
I updated from beta.5 to beta.8 today and I am now experiencing the same problem (on Windows). The Generic ESP boards are now grayed out and the same message occurs Compilation error: Error: 2 UNKNOWN: no FQBN provided .
UPDATE:
It seems to be an problem with updating the Arduino IDE, onces the Arduino IDE is updated just uninstall and re-install the ESP boards library in the Boards Manager.
I was not able to reproduce this issue of the SparkFun Apollo3 Boards platform not appearing under the IDE’s board menus until I finally spotted the essential clue:
#421 (comment)
Notice that version 1.2.2 was installed, but the latest version offered by the package index at that time was 2.1.0
There was a bug where the IDE did not recognize outdated boards platforms. This was actually a bug in the Arduino CLI tool the Arduino IDE uses to handle all the non-GUI tasks: arduino/arduino-cli#1401
That bug has already been fixed: arduino/arduino-cli#1410
The fixed version of Arduino CLI is used starting with Arduino IDE 2.0.0-beta.12, so you should no longer experience this issue when using the latest version of the IDE.
Источник
Make error message from compiling w/o board selected more user friendly #62
Describe the current behavior
On the first use, no board is selected. A new user may not realize it is necessary to select one. If they attempt to compile a sketch without selecting one, they will receive only this cryptic error message:
and this notification:
This doesn’t mean anything to even very advanced IDE users, and the user will have difficulty understanding what they need to do to resolve it.
To reproduce
- Quit the IDE if it is running.
- Simulate a fresh install by deleting the configuration folder:
- Windows:
Port defaults to first available com port with lowest number not the last used #180 ).
The board/port selector menu should show » ❌ No board selected«.
Describe the request
Show a user friendly error message. Something like:
No board selected. Please select your Arduino board from the Tools > Board menu.
Desktop
- OS: Windows 10
- Version: 2.0.0-rc3-snapshot.1d88263
Date: 2022-01-24T16:22:30.529Z
CLI Version: 0.20.2 [13783819]
Additional context
Even among Arduino CLI users, I have found that the concept of «FQBN» is not widely known. IDE users are even less likely to be familiar with this acronym, and even less anxious to spend their time learning what it means, since the it is not otherwise a part of the IDE user experience.
Note that the error message produced by the reproduction instructions above is currently different than described due to a recent regression in Arduino CLI: arduino/arduino-cli#1812
The text was updated successfully, but these errors were encountered:
Источник
Arduino Digispark support #364
It would be nice to add Arduino Digispark support (ATtiny85-based board).
When we try to upload the firmware (just a blink example), it raises the following error:
however, when we try to configure the port, it shows only NO PORTS DISCOVERED , as following:
The text was updated successfully, but these errors were encountered:
@per1234 I saw you marked it as a bug, why so?
It could be that the driver installation didn’t go through and I also saw in their troubleshooting and wiki that once the board is configured as a USB device it will only be visible for 5 seconds before it starts acting as a peripheral.
Might that be one of the issues?
In the case of DigiSpark is a vUSB device, The micronucleus uploader doesn’t use serial.port , so Arduino Pro IDE’s requirement of having a serial port selected is unnecessary.
This requirement means the only way to upload to a pure USB device is to select some random serial port, even though it won’t be used for the upload. Some people might not even have a serial port available for this purpose.
A workaround the platform author to get around this limitation might be to not define the upload.protocol property, so the «always Upload Using Programmer» behavior is used (which doesn’t require a serial port), but then you might have issues of the user needing to have the correct Tools > Programmer selection. Anyway, Pro IDE also doesn’t support the «always Upload Using Programmer» behavior currently (https://github.com/arduino/arduino-pro-ide/issues/309).
The Arduino IDE can handle this sort of use case fine, so it’s certainly achievable.
@per1234
We need to make sure this use case is covered, we’ll potentially have it with other HID or DFU based boards.
I’ll put it in our task-list, thank you for chiming in 👍
@per1234 I have been researching this case.
I don’t have this board, but tried to upload using the Java IDE anyway to see the command and any possible error.
I get an error I cannot recognise
Error while uploading: missing ‘program.params.verbose’ configuration parameter
from the CLI, running arduino-cli compile -b digistump:avr:digispark-tiny -u -P micronucleusprog I also go nowhere and get
Error during Upload: programming error: recipe not found ‘program.pattern’
Maybe there’s something wrong with the upload recipe in the platform definition?
I get an error I cannot recognise
Error while uploading: missing ‘program.params.verbose’ configuration parameter
This is because the platform is not designed for use with «Upload Using Programmer». I don’t know why they added that «micronucleus» programmer because it can’t be used.
Hit the upload button. The bottom status box will now ask you to plug in your Digispark — at this point you need to plug it in — or unplug and replug it.
You’ll see the upload progress and then it will immediately run your code on the Digispark.
from the CLI, running arduino-cli compile -b digistump:avr:digispark-tiny -u -P micronucleusprog I also go nowhere and get
Error during Upload: programming error: recipe not found ‘program.pattern’
Remove the -P micronucleusprog from the command.
Maybe there’s something wrong with the upload recipe in the platform definition?
Источник
Вс, 07/05/2017 — 20:17
#1
T.Rook
Offline
Зарегистрирован: 05.03.2016
полностью скетч и ошибку покажите.
Еще раз проверьте выбор платы и порта в IDE
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 20:31
#2
Jeka_M
Offline
Зарегистрирован: 06.07.2014
Полностью ошибку приведите. Скопируйте сюда текст и вставьте.
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 20:35
#3
qwone
Offline
Зарегистрирован: 03.07.2016
Скорее чел ну очень зеленый. У него IDE стоит на UNO , а он пихает Nano.
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 20:48
#4
T.Rook
Offline
Зарегистрирован: 05.03.2016
Кажется, это была агония. Предлагаю консилиум на этом закрыть. Расходимся.
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 20:54
#5
meganom
Offline
Зарегистрирован: 07.05.2017
Скетч для проверки I2C переходника для LCD 16×2
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()
{
// initialize the LCD
lcd.begin();
// Turn on the blacklight and print a message.
lcd.backlight();
lcd.print(«Hello, world!»);
}
void loop()
{
// Do nothing here…
}
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 20:58
#6
andriano
Offline
Зарегистрирован: 20.06.2015
meganom, первопричина Ваших проблем в том, что Вы читать очень не любите.
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 21:01
#7
meganom
Offline
Зарегистрирован: 07.05.2017
Arduino: 1.8.2 (Windows 8.1), Плата:»Arduino Nano, ATmega328″
D:ArduinoArduino-LiquidCrystal-I2C-libraryArduino-LiquidCrystal-I2C-library-masterexamplesHelloWorldHelloWorld.ino:4:31: fatal error: LiquidCrystal_I2C.h: No such file or directory
#include <LiquidCrystal_I2C.h>
^
compilation terminated.
exit status 1
Ошибка компиляции для платы Arduino Nano.
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 21:04
#8
T.Rook
Offline
Зарегистрирован: 05.03.2016
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 21:06
#9
meganom
Offline
Зарегистрирован: 07.05.2017
да установил
Arduino: 1.8.2 (Windows 8.1), Плата:»Arduino Nano, ATmega328″
Изменены опции сборки, пересобираем все
D:ArduinoArduino-LiquidCrystal-I2C-libraryArduino-LiquidCrystal-I2C-library-masterexamplesHelloWorldHelloWorld.ino:4:31: fatal error: LiquidCrystal_I2C.h: No such file or directory
#include <LiquidCrystal_I2C.h>
^
compilation terminated.
Несколько библиотек найдено для «LiquidCrystal.h»
Используется: C:UsersихихиихDocumentsArduinolibrariesLiquidCrystal
Не используется: D:Program Files (x86)ArduinolibrariesLiquidCrystal
exit status 1
Ошибка компиляции для платы Arduino Nano.
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 21:09
#10
meganom
Offline
Зарегистрирован: 07.05.2017
может я что то не так устанавливаю , мне после работы с мк на си. тяжело понять структуру скетча , я думал, загрузил скетч и используй , я так понял нужно подключать еще библиотеки , но как правильно это сделать я не пойму
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 21:09
#11
T.Rook
Offline
Зарегистрирован: 05.03.2016
meganom пишет:
да установил
Arduino: 1.8.2 (Windows 8.1), Плата:»Arduino Nano, ATmega328″
Изменены опции сборки, пересобираем все
D:ArduinoArduino-LiquidCrystal-I2C-libraryArduino-LiquidCrystal-I2C-library-masterexamplesHelloWorldHelloWorld.ino:4:31: fatal error: LiquidCrystal_I2C.h: No such file or directory
#include <LiquidCrystal_I2C.h>
^
compilation terminated.
Несколько библиотек найдено для «LiquidCrystal.h»
Используется: C:UsersихихиихDocumentsArduinolibrariesLiquidCrystal
Не используется: D:Program Files (x86)ArduinolibrariesLiquidCrystal
exit status 1
Ошибка компиляции для платы Arduino Nano.
Давайте удалим все тут: C:UsersихихиихDocumentsArduinolibrariesLiquidCrystal
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 21:10
#12
meganom
Offline
Зарегистрирован: 07.05.2017
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 21:10
#13
T.Rook
Offline
Зарегистрирован: 05.03.2016
meganom пишет:
может я что то не так устанавливаю , мне после работы с мк на си. тяжело понять структуру скетча , я думал, загрузил скетч и используй , я так понял нужно подключать еще библиотеки , но как правильно это сделать я не пойму
Начальные знания тут: Среда разработки
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 21:11
#14
andriano
Offline
Зарегистрирован: 20.06.2015
meganom, установить нужно только одну. Это не тот случай, когда чем больше, тем лучше.
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 21:37
#15
meganom
Offline
Зарегистрирован: 07.05.2017
И так, я скачал скетч, открываю его. Вижу что в начале есть подключение двух библиотек
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
Wire.h почему-то написана красным шрифтом а LiquidCrystal_I2C.h черным , что это значит я не понял, но скорей всего это значит что одна библиотека подключена а вторая нет . Дальше мне последовательность действий не понятна. Как правильно подключить библиотеку LiquidCrystal_I2C.h и Wire.h ? Я так понимаю, что они должны находится в папке library среды ардуино , и при начале компиляции проекта среда лезет в эту папку и подтягивает эти библиотеки если их нет то выдаёт ошибку .Мне не понятно где брать недостающую библиотеку и как правильно ее подключить к проекту .По идеи недостающая библиотека есть в папке с скетчем который я скачал . а проектах ардуино есть только два типа файлов , сам скетч и .h файл ? Сколько типов файлов нужно подключать к проекту ?
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 21:47
#16
Клапауций 112
Offline
Зарегистрирован: 01.03.2017
meganom пишет:
И так, я скачал скетч…
вот на этом месте закрывай этот форум и трахай мосг автору скетча.
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 21:51
#17
toc
Offline
Зарегистрирован: 09.02.2013
>> Пару дней как пользуюсь платкой arduino nano.
>> Какой скетч не возьму , везде пишет- Ошибка компиляции для платы Arduino Nano.
meganom, дайте результат компиляции скетча Blink
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 21:54
#18
T.Rook
Offline
Зарегистрирован: 05.03.2016
meganom пишет:
Сколько типов файлов нужно подключать к проекту ?
Если коротко, то библиотека: h — заголовочный файл (обычно указывают в include), cpp — реализация.
По include и другие конструкции языка таки следует почитать.
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 22:10
#19
meganom
Offline
Зарегистрирован: 07.05.2017
T.Rook пишет:
meganom пишет:
Сколько типов файлов нужно подключать к проекту ?
Если коротко, то библиотека: h — заголовочный файл (обычно указывают в include), cpp — реализация.
По include и другие конструкции языка таки следует почитать.
Это я все знаю . Объясните мне, куда положить или как подключить эти библиотеки если они у меня есть
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 22:17
#20
meganom
Offline
Зарегистрирован: 07.05.2017
подключил библиотеку .выпало еще больше ошибок
Arduino: 1.8.2 (Windows 8.1), Плата:»Arduino Nano, ATmega328″
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::getBacklight()’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::expanderWrite(unsigned char)’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::noBacklight()’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::backlight()’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::pulseEnable(unsigned char)’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::write4bits(unsigned char)’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::send(unsigned char, unsigned char)’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::clear()’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::home()’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::setCursor(unsigned char, unsigned char)’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::noDisplay()’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::display()’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::noCursor()’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::cursor()’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::noBlink()’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::blink()’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::scrollDisplayLeft()’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::scrollDisplayRight()’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::leftToRight()’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::rightToLeft()’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::autoscroll()’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::noAutoscroll()’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::createChar(unsigned char, unsigned char*)’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::begin()’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::load_custom_character(unsigned char, unsigned char*)’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::setBacklight(unsigned char)’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
librariesArduino-LiquidCrystal-I2C-library-masterLiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’:
(.text+0x0): multiple definition of `LiquidCrystal_I2C::printstr(char const*)’
sketchLiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Ошибка компиляции для платы Arduino Nano.
Этот отчёт будет иметь больше информации с
включенной опцией Файл -> Настройки ->
«Показать подробный вывод во время компиляции»
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 22:27
#21
T.Rook
Offline
Зарегистрирован: 05.03.2016
meganom пишет:
T.Rook пишет:
meganom пишет:
Сколько типов файлов нужно подключать к проекту ?
Если коротко, то библиотека: h — заголовочный файл (обычно указывают в include), cpp — реализация.
По include и другие конструкции языка таки следует почитать.
Это я все знаю . Объясните мне, куда положить или как подключить эти библиотеки если они у меня есть
1. в каталог libraries. Распаковать в каталог и этого достаточно.
2. Давать кучу ошибок без скеча — подумай, как люди у которых ты спрашиваешь будут анализировать и что?
3. По поводу «collect2.exe: error: ld returned 1 exit status» — недавно на форуме было, поищите.
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 22:29
#22
meganom
Offline
Зарегистрирован: 07.05.2017
T.Rook пишет:
meganom пишет:
T.Rook пишет:
meganom пишет:
Сколько типов файлов нужно подключать к проекту ?
Если коротко, то библиотека: h — заголовочный файл (обычно указывают в include), cpp — реализация.
По include и другие конструкции языка таки следует почитать.
Это я все знаю . Объясните мне, куда положить или как подключить эти библиотеки если они у меня есть
1. в каталог libraries. Распаковать в каталог и этого достаточно.
2. Давать кучу ошибок без скеча — подумай, как люди у которых ты спрашиваешь будут анализировать и что?
1 Где это каталог находится?
2 В каком виде нужен скетч? Тут можно прикреплять файлы?
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 22:30
#23
ua6em
Онлайн
Зарегистрирован: 17.08.2016
ТС точно не читатель, ТС писатель
- Войдите на сайт для отправки комментариев
Вс, 07/05/2017 — 22:35
#24
T.Rook
Offline
Зарегистрирован: 05.03.2016
- Войдите на сайт для отправки комментариев
Чт, 25/05/2017 — 18:50
#25
FrostDad
Offline
Зарегистрирован: 25.05.2017
Здраствуйте, у меня анологичная проблема.
скетч: /* Данный скетч делает следующее: передатчик (TX) отправляет массив
* данных, который генерируется согласно показаниям с кнопки и с
* двух потенциомтеров. Приёмник (RX) получает массив, и записывает
* данные на реле, сервомашинку и генерирует ШИМ сигнал на транзистор.
by AlexGyver 2016
*/
#include <SPI.h>
#include «nRF24L01.h»
#include «RF24.h»
RF24 radio(9,10); // «создать» модуль на пинах 9 и 10 Для Уно
//RF24 radio(9,53); // для Меги
byte address[][6] = {«1Node»,»2Node»,»3Node»,»4Node»,»5Node»,»6Node»}; //возможные номера труб
void setup(){
Serial.begin(9600); //открываем порт для связи с ПК
radio.begin(); //активировать модуль
radio.setAutoAck(1); //режим подтверждения приёма, 1 вкл 0 выкл
radio.setRetries(0,15); //(время между попыткой достучаться, число попыток)
radio.enableAckPayload(); //разрешить отсылку данных в ответ на входящий сигнал
radio.setPayloadSize(32); //размер пакета, в байтах
radio.openReadingPipe(1,address[0]); //хотим слушать трубу 0
radio.setChannel(0x60); //выбираем канал (в котором нет шумов!)
radio.setPALevel (RF24_PA_MAX); //уровень мощности передатчика. На выбор RF24_PA_MIN, RF24_PA_LOW, RF24_PA_HIGH, RF24_PA_MAX
radio.setDataRate (RF24_250KBPS); //скорость обмена. На выбор RF24_2MBPS, RF24_1MBPS, RF24_250KBPS
//должна быть одинакова на приёмнике и передатчике!
//при самой низкой скорости имеем самую высокую чувствительность и дальность!!
radio.powerUp(); //начать работу
radio.startListening(); //начинаем слушать эфир, мы приёмный модуль
}
void loop() {
byte pipeNo, gotByte;
while( radio.available(&pipeNo)){ // слушаем эфир со всех труб
radio.read( &gotByte, sizeof(gotByte) ); // чиатем входящий сигнал
Serial.print(«Recieved: «); Serial.println(gotByte);
}
}
ошибка:Arduino: 1.8.2 (Windows 7), Плата:»Arduino Nano, ATmega328″
C:ДаняардуиносчетчискечиNRF24L01sketch_may25aNRF24L01sketch_may25a.ino:9:22: fatal error: nRF24L01.h: No such file or directory
compilation terminated.
exit status 1
Ошибка компиляции для платы Arduino Nano.
Прочитав данную тему, так и не разобрался в чем дело,прошу помощи.
- Войдите на сайт для отправки комментариев
Чт, 25/05/2017 — 19:15
#26
Jeka_M
Offline
Зарегистрирован: 06.07.2014
- Войдите на сайт для отправки комментариев
Чт, 25/05/2017 — 19:20
#27
qwone
Offline
Зарегистрирован: 03.07.2016
(анекдот) Сотый раз Чунгачгук наступал на грабли и не мог никак понять, что же бъет его по лбу. Надо открыть тему на каком нибудь форуме. Но решить на каком форуме открыть эту тему Чунгачгук не смог. Наверно надо на форуме "Охота и рыбалка". Ведь Чунгачгук счил себя опытным охотником, а не каким-то садоводом.
- Войдите на сайт для отправки комментариев
Сб, 27/05/2017 — 15:58
#28
vovan_UA
Offline
Зарегистрирован: 27.05.2017
A у меня вот такую ошибку выдает после попытки залития скеча через XLoader то что ниже ошибка в адруино ид при том что не имеет значения что закидывать сразу вопрос можно ли это вылечить как то как я вижу это ошибка при проверке
Скетч использует 21464 байт (69%) памяти устройства. Всего доступно 30720 байт.
Глобальные переменные используют 977 байт (47%) динамической памяти, оставляя 1071 байт для локальных переменных. Максимум: 2048 байт.
avrdude: verification error, first mismatch at byte 0x0042
0xf1 != 0x1d
avrdude: verification error; content mismatch
avrdude: verification error; content mismatch
- Войдите на сайт для отправки комментариев
Вс, 28/05/2017 — 13:56
#29
DAFdriver
Offline
Зарегистрирован: 12.08.2016
В ардуино я новичек . Появился форум (понарамный ксв-метр) . Решил собрать. И сразу проблемка — неполучается прошить arduino nano .
Там несколько скетчей и ни один не мгу залить , другие библиотеки (примеры)грузятся и работают. Помогите плиз .
Вот скетч :
/***************************************************************************
* Name : DDS_Sweeper.BAS *
* Author : Beric Dunn (K6BEZ) *
* Notice : Copyright (c) 2013 CC-BY-SA *
* : Creative Commons Attribution-ShareAlike 3.0 Unported License *
* Date : 9/26/2013 *
* Version : 1.0 *
* Notes : Written using for the Arduino Micro *
* : Pins: *
* : A0 — Reverse Detector Analog in *
* : A1 — Forward Detector Analog in *
* : Modified by Norbert Redeker (DG7EAO) 07/2014 *
* : TFT Display mit ILI9341 Chip, SPI, 240 x 320 *
***************************************************************************/
#include <SPI.h>
#include «Ucglib.h»
#include «rusFont.h»
// Define Pins used to control AD9850 DDS
const int FQ_UD=11;
const int SDAT=10;
const int SCLK=12;
const int RESET=9;
// Variablen für Display
double vswrArray[110]; //Array für SWR
int z = 0; // Index für Array
double SwrFreq = 14; // Variable für Freq. mit SWR Min.
double SwrMin = 100; // Variable für SWR Min.
double Freq1 = 1; // Freq. Links unterste Zeile Display
double Freq2 = 15; // Freq. Mitte unterste Zeile Display
double Freq3 = 30; // Freq. Mitte unterste Zeile Display
unsigned long milliold = 0; //Millisekunden für Entprellung Interrupt
unsigned long millinew = 0; //Millisekunden für Entprellung Interrupt
int flag = 0; // wir auf 1 gesetzt bei Interrupt, in void Loop perform_sweep
double counter = 0; // Zähler um erste Interrupts zu ignorieren
// Variablen für Messung
double Fstart_MHz = 1; // Start Frequency for sweep
double Fstop_MHz = 30; // Stop Frequency for sweep
double current_freq_MHz; // Temp variable used during sweep
long serial_input_number; // Used to build number from serial stream
int num_steps = 100; // Number of steps to use in the sweep
char incoming_char; // Character read from serial stream
//Konstruktor für Display
Ucglib_ST7735_18x128x160_SWSPI ucg(/*sclk=*/ 12, /*data=*/ 10, /*cd=*/ 6 , /*cs=*/ 5, /*reset=*/ 4);
// the setup routine runs once when you press reset:
void setup() {
// Voltmetr
analogReference(INTERNAL);
float Vbat = (analogRead(A5) * 1.1) / 1023.0;
float Vin = Vbat / (69.8 / (783.0 + 69.8)); // R2/(R1+R2)
// Schreibe Info Text auf Display
ucg.begin(UCG_FONT_MODE_SOLID);
ucg.clearScreen();
ucg.setRotate90();
ucg.setFont(ucg_font_9x15_tf);
ucg.setColor(255, 255, 255);
ucg.setPrintPos(10,20);
ucg.print(«Arduino Antenna»);
ucg.setPrintPos(25,40);
ucg.print(«SWR Analyzer»);
ucg.setPrintPos(35,60);
ucg.print(«1-30 MHz»);
ucg.setPrintPos(20,80);
ucg.print(«Komsomolsk 2017»);
ucg.setPrintPos(5,128);
ucg.print(«BAT»);
ucg.setPrintPos(40,128);
ucg.print(Vin, 1);
// Configiure DDS control pins for digital output
pinMode(FQ_UD,OUTPUT);
pinMode(SCLK,OUTPUT);
pinMode(SDAT,OUTPUT);
pinMode(RESET,OUTPUT);
//Tasten Interrupt an PIN 2
pinMode(2,OUTPUT);
digitalWrite(2, HIGH);
attachInterrupt(0, key2, FALLING);
unsigned long milliold = millis();
//Tasten Interrupt an PIN 3
pinMode(3,OUTPUT);
digitalWrite(3, HIGH);
attachInterrupt(1, key3, FALLING);
//milliold = millis();
// Configure LED pin for digital output
pinMode(13,OUTPUT);
// Set up analog inputs on A0 and A1, internal reference voltage
pinMode(A0,INPUT);
pinMode(A1,INPUT);
analogReference(INTERNAL);
// initialize serial communication at 57600 baud
Serial.begin(57600);
// Reset the DDS
digitalWrite(RESET,HIGH);
digitalWrite(RESET,LOW);
//Initialise the incoming serial number to zero
serial_input_number=0;
}
// the loop routine runs over and over again forever:
void loop() {
//Check for character
if(Serial.available()>0){
incoming_char = Serial.read();
switch(incoming_char){
case ‘0’:
case ‘1’:
case ‘2’:
case ‘3’:
case ‘4’:
case ‘5’:
case ‘6’:
case ‘7’:
case ‘8’:
case ‘9’:
serial_input_number=serial_input_number*10+(incoming_char-‘0’);
break;
case ‘A’:
//Turn frequency into FStart
Fstart_MHz = ((double)serial_input_number)/1000000;
serial_input_number=0;
break;
case ‘B’:
//Turn frequency into FStop
Fstop_MHz = ((double)serial_input_number)/1000000;
serial_input_number=0;
break;
case ‘C’:
//Turn frequency into FStart and set DDS output to single frequency
Fstart_MHz = ((double)serial_input_number)/1000000;
//SetDDSFreq(Fstart_MHz);
SetDDSFreq(Fstart_MHz * 1000000);
delay(100);
SetDDSFreq(Fstart_MHz * 1000000);
serial_input_number=0;
break;
case ‘N’:
// Set number of steps in the sweep
num_steps = serial_input_number;
serial_input_number=0;
break;
case ‘S’:
case ‘s’:
Perform_sweep();
break;
case ‘?’:
// Report current configuration to PC
Serial.print(«Start Freq:»);
Serial.println(Fstart_MHz*1000000);
Serial.print(«Stop Freq:»);
Serial.println(Fstop_MHz*1000000);
Serial.print(«Num Steps:»);
Serial.println(num_steps);
break;
}
Serial.flush();
}
//Perform Sweep nach Interrupt PIN2 oder 3
// ingnoriere Startup Interrupts durch counter
if (flag == 1 && counter >2)
{
flag = 0;
Perform_sweep();
}
}
void Perform_sweep(){
double FWD=0;
double REV=0;
double VSWR;
double Fstep_MHz = (Fstop_MHz-Fstart_MHz)/num_steps;
z = 0;
SwrMin = 100;
ucg.clearScreen();
ucg.setFont(ucg_font_9x15_tf);
ucg.setColor(255, 0, 100);
ucg.setPrintPos(35,60);
ucg.print(«Analiz KSW»);
// Start loop
for(int i=0;i<=num_steps;i++){
// Calculate current frequency
current_freq_MHz = Fstart_MHz + i*Fstep_MHz;
// Set DDS to current frequency
SetDDSFreq(current_freq_MHz*1000000);
// Wait a little for settling
//delay(10);
delay(100);
// Read the forward and reverse voltages
REV = analogRead(A0);
FWD = analogRead(A1);
//Offset Korrektur
REV = REV-1;
if(REV>=FWD){
REV = FWD-1;
}
if (REV <1) {
REV = 1;
}
VSWR = (FWD+REV)/(FWD-REV);
//Skalieren für Ausgabe
VSWR = VSWR * 1000;
// Send current line back to PC over serial bus
Serial.print(current_freq_MHz*1000000);
Serial.print(«,0,»);
Serial.print(VSWR);
Serial.print(«,»);
Serial.print(FWD);
Serial.print(«,»);
Serial.println(REV);
// Übergebe SWR an Array
// ERmittele Freq bei niedrigsten SWR
vswrArray[z] = VSWR/1000;
if (vswrArray[z] > 10) vswrArray[z] = 10;
if (vswrArray[z] < SwrMin && vswrArray[z] > 1)
{
SwrMin = vswrArray[z];
SwrFreq = current_freq_MHz;
}
z = z + 1;
}
// Send «End» to PC to indicate end of sweep
Serial.println(«End»);
Serial.flush();
ucg.clearScreen();
//Zeichne Grid
CreateGrid();
ucg.setColor(76, 255, 0);
// Draw Line
double last = 10;
double xx = 6;
double j = 1;
for (int i = 1 ;i < 103; i++){
xx = vswrArray[i];
ucg.drawLine(j,105-last*9, j+1, 105-xx*9);
ucg.drawLine(j+1,105-last*9, j+2, 105-xx*9);
j = j + 1.5;
last = xx;
}
}
// Setze DDS Frequenz
void SetDDSFreq(double Freq_Hz){
// Calculate the DDS word — from AD9850 Datasheet
int32_t f = Freq_Hz * 4294967295/125000000;
// Send one byte at a time
for (int b=0;b<4;b++,f>>=8){
send_byte(f & 0xFF);
}
// 5th byte needs to be zeros
send_byte(0);
// Strobe the Update pin to tell DDS to use values
digitalWrite(FQ_UD,HIGH);
digitalWrite(FQ_UD,LOW);
}
// Sende Daten an DDS
void send_byte(byte data_to_send){
// Bit bang the byte over the SPI bus
for (int i=0; i<8; i++,data_to_send>>=1){
// Set Data bit on output pin
digitalWrite(SDAT,data_to_send & 0x01);
// Strobe the clock pin
digitalWrite(SCLK,HIGH);
digitalWrite(SCLK,LOW);
}
}
//Zeichne Grid auf TFT Display
void CreateGrid()
{
//ucg.clearScreen();
double maxSwr = 10;
ucg.setFont(ucg_font_9x15_tf);
ucg.drawHLine(0,60,155);
ucg.drawHLine(0,98,155);
ucg.drawVLine(39,15,90);
ucg.drawVLine(78,15,90);
ucg.drawVLine(117,15,90);
ucg.setPrintPos(0, 118);
ucg.print(Freq1,3);
ucg.setPrintPos(65, 118);
ucg.print(Freq2,3);
ucg.setPrintPos(130, 118);
ucg.print(Freq3,3);
ucg.setPrintPos(1, 11);
ucg.print(«SWR»);
ucg.setPrintPos(30, 11);
ucg.print(SwrMin,2);
ucg.setPrintPos(65, 11);
ucg.print(«>»);
ucg.setPrintPos(75, 11);
ucg.print(maxSwr,2);
ucg.setPrintPos(125, 11);
ucg.print(SwrFreq,3);
ucg.drawRFrame(0,15,155,90, 1);
}
// Interrupt Service Routine
// Abfrage Low an Pin 2
void key2()
{
//ignoriere Startup Interrupts > counter
counter = counter + 1;
//Entprellen mit millis()
millinew = millis();
if (millinew — milliold < 1000)
{
milliold = millinew;
return;
}
milliold = millinew;
Fstart_MHz = 1; // Start Frequency for sweep
Fstop_MHz = 30; // Stop Frequency for sweep
num_steps = 102; // Steps
Freq1 = 1; // Unterste Zeile Display Freq. Links
Freq2 = 15; // Unterste Zeile Display Freq. Mitte
Freq3 = 30; // Unterste Zeile Display Freq. Recht
//Perform_sweep();
flag = 1;
}
// Interrupt Service Routine
// Abfrage Low an Pin 3
void key3()
{
//ignoriere Startup Interrupts > counter
counter = counter + 1;
//Entprellen mit millis()
millinew = millis();
if (millinew — milliold < 1000)
{
milliold = millinew;
return;
}
milliold = millinew;
int x = SwrFreq + 0.5; //Runde auf Mhz
Fstart_MHz = x-1; // Start Frequency for sweep
Fstop_MHz = x+1; // Stop Frequency for sweep
num_steps = 102; // Steps
Freq1 = x-1; // Unterste Zeile Display Freq. Links
Freq2 = x; // Unterste Zeile Display Freq. Mitte
Freq3 = x+1; // Unterste Zeile Display Freq. Rechts
//Perform_sweep();
flag = 1;
}
плюс Русский текст , он в том — же скетче :
const ucg_fntpgm_uint8_t my14x10rus[4157] UCG_SECTION(«.progmem.my14x10») = {
0,11,15,0,255,14,3,35,6,248,32,255,0,15,255,14,
0,0,0,0,8,0,0,2,14,14,4,1,0,64,192,192,
192,192,192,192,192,192,128,0,64,192,128,6,5,5,7,0,
9,68,204,204,204,136,10,14,28,11,0,0,8,128,8,128,
17,0,17,0,127,192,17,0,17,0,34,0,34,0,255,128,
34,0,34,0,68,0,68,0,9,14,28,10,0,0,8,0,
8,0,59,128,123,0,200,0,200,0,232,0,107,0,11,128,
9,128,9,128,111,0,238,0,8,0,8,14,14,9,0,0,
97,179,214,102,12,12,24,24,48,48,102,107,205,134,9,14,
28,10,0,0,56,0,124,0,108,0,108,0,108,0,56,0,
56,128,109,128,199,0,194,0,199,0,237,128,124,128,56,0,
2,5,5,3,0,10,128,192,192,192,64,5,14,14,6,0,
0,24,48,96,96,192,192,192,192,192,192,96,96,48,24,5,
14,14,6,0,0,192,96,48,48,24,24,24,24,24,24,56,
48,96,192,7,7,7,8,0,4,146,214,124,16,124,214,146,
8,10,10,10,0,1,8,24,24,24,127,254,24,24,24,16,
4,6,6,5,0,0,112,96,96,64,192,192,8,2,2,9,
0,5,127,254,3,3,3,4,0,0,224,160,224,8,14,14,
9,0,0,3,3,6,6,12,12,24,24,48,48,96,96,192,
192,9,14,28,10,0,0,62,0,127,0,227,128,197,128,197,
128,197,128,201,128,201,128,209,128,209,128,209,128,227,128,127,
0,62,0,9,14,28,10,0,0,12,0,28,0,60,0,124,
0,8,0,4,0,12,0,12,0,8,0,4,0,12,0,12,
0,127,128,255,128,9,14,28,10,0,0,126,0,255,0,195,
128,193,128,1,128,3,128,63,0,126,0,224,0,192,0,192,
0,192,0,223,128,191,0,9,14,28,10,0,0,126,0,255,
0,195,128,1,128,1,128,3,0,58,0,119,0,3,128,1,
128,1,128,3,128,255,0,126,0,9,14,28,10,0,0,2,
0,6,0,14,0,30,0,62,0,118,0,230,0,198,0,251,
128,247,0,6,0,6,0,6,0,4,0,9,14,28,10,0,
0,127,128,127,128,96,0,96,0,96,0,110,0,111,0,3,
128,1,128,1,128,1,128,195,0,255,0,124,0,9,14,28,
10,0,0,31,0,127,0,96,0,192,0,192,0,192,0,222,
0,223,0,195,128,193,128,193,128,227,0,127,0,60,0,9,
14,28,10,0,0,127,128,255,128,0,0,3,0,3,0,6,
0,6,0,12,0,12,0,24,0,24,0,48,0,48,0,32,
0,9,14,28,10,0,0,58,0,119,0,227,128,193,128,193,
128,99,0,54,0,111,0,227,128,193,128,193,128,227,128,119,
0,46,0,9,14,28,10,0,0,60,0,255,0,231,0,195,
128,193,128,193,128,225,128,253,128,125,128,1,128,3,128,7,
0,127,0,252,0,3,11,11,4,0,2,224,160,224,0,0,
0,0,0,224,160,224,4,13,13,5,0,0,112,80,112,0,
0,0,0,0,112,80,112,96,192,9,11,22,10,0,1,1,
128,3,128,15,0,28,0,120,0,224,0,120,0,28,0,15,
0,3,128,1,128,9,6,12,10,0,4,127,128,255,0,0,
0,0,0,127,128,255,0,9,11,22,10,0,1,192,0,224,
0,120,0,60,0,15,0,3,128,15,0,60,0,120,0,224,
0,192,0,8,14,14,9,0,0,116,238,135,3,3,6,14,
56,48,48,0,0,48,48,9,11,22,10,0,1,62,0,65,
0,128,128,154,128,166,128,162,128,162,128,166,128,155,0,64,
0,63,128,9,14,28,10,0,0,252,0,254,0,199,0,195,
128,193,128,193,128,193,128,253,128,253,128,193,128,193,128,193,
128,193,128,129,0,9,14,28,10,0,0,94,0,223,0,195,
128,193,128,193,128,195,128,255,0,255,0,195,128,193,128,193,
128,195,128,223,0,190,0,9,14,28,10,0,0,14,0,63,
0,115,128,97,128,192,0,192,0,192,0,192,0,192,0,192,
0,96,0,112,0,63,128,15,0,9,14,28,10,0,0,238,
0,111,0,99,128,97,128,97,128,97,128,97,128,97,128,97,
128,97,128,97,128,99,128,111,0,238,0,9,14,28,10,0,
0,95,128,223,0,192,0,192,0,192,0,192,0,223,0,222,
0,192,0,192,0,192,0,192,0,223,128,191,0,9,14,28,
10,0,0,95,128,223,0,192,0,192,0,192,0,192,0,223,
0,222,0,192,0,192,0,192,0,192,0,192,0,128,0,9,
14,28,10,0,0,63,128,127,128,225,128,192,0,192,0,192,
0,192,0,207,128,223,128,193,128,193,128,225,128,127,128,62,
0,9,14,28,10,0,0,129,0,193,128,193,128,193,128,193,
128,193,128,223,128,223,128,193,128,193,128,193,128,193,128,193,
128,64,128,8,14,14,10,1,0,254,127,24,24,24,24,24,
24,24,24,24,24,254,127,9,14,28,10,0,0,31,128,63,
128,1,128,1,128,1,128,1,128,1,128,1,128,1,128,1,
128,1,128,195,128,255,0,62,0,9,14,28,10,0,0,65,
128,195,128,199,0,206,0,220,0,216,0,216,0,216,0,216,
0,220,0,206,0,199,0,195,128,65,128,9,14,28,10,0,
0,64,0,192,0,192,0,192,0,192,0,192,0,192,0,192,
0,192,0,192,0,192,0,192,0,255,128,255,0,9,14,28,
10,0,0,193,128,227,128,247,128,247,128,213,128,193,128,213,
128,221,128,221,128,201,128,193,128,193,128,193,128,129,0,9,
14,28,10,0,0,225,0,225,128,241,128,241,128,249,128,217,
128,221,128,205,128,205,128,197,128,197,128,193,128,193,128,128,
128,9,14,28,10,0,0,46,0,111,0,227,128,193,128,193,
128,193,128,193,128,193,128,193,128,193,128,193,128,227,128,123,
0,58,0,9,14,28,10,0,0,254,0,255,0,195,128,193,
128,193,128,195,128,223,0,222,0,192,0,192,0,192,0,192,
0,192,0,128,0,10,15,30,10,0,255,46,0,111,0,227,
128,193,128,193,128,193,128,193,128,193,128,193,128,193,128,193,
128,227,0,123,128,58,192,0,192,9,14,28,10,0,0,126,
0,255,0,195,128,193,128,193,128,195,128,223,0,220,0,206,
0,199,0,195,128,193,128,193,128,129,0,9,14,28,10,0,
0,62,0,127,0,224,0,192,0,192,0,224,0,118,0,27,
0,3,128,1,128,1,128,3,128,255,128,127,0,9,14,28,
10,0,0,255,0,127,128,0,0,12,0,12,0,12,0,12,
0,12,0,12,0,12,0,12,0,12,0,12,0,4,0,9,
14,28,10,0,0,64,128,193,128,193,128,193,128,193,128,193,
128,193,128,193,128,193,128,193,128,193,128,99,0,127,0,62,
0,9,14,28,10,0,0,227,128,99,0,99,0,99,0,34,
0,54,0,54,0,54,0,20,0,28,0,28,0,28,0,8,
0,8,0,10,14,28,11,0,0,64,64,192,192,192,192,192,
192,192,192,192,192,204,192,204,192,204,192,222,192,222,192,211,
192,193,192,128,192,9,14,28,10,0,0,193,128,193,128,193,
128,99,0,99,0,50,0,56,0,28,0,14,0,103,0,99,
0,193,128,193,128,193,128,10,14,28,10,0,0,192,192,192,
192,97,128,97,128,51,0,63,0,30,0,12,0,8,0,4,
0,12,0,12,0,12,0,8,0,9,14,28,10,0,0,127,
128,255,128,1,128,3,128,7,0,6,0,4,0,16,0,48,
0,112,0,224,0,192,0,255,128,255,0,5,14,14,6,0,
0,248,192,192,192,192,192,192,192,192,192,192,192,192,248,9,
14,28,10,0,0,192,0,96,0,96,0,48,0,48,0,24,
0,24,0,12,0,12,0,6,0,6,0,3,0,3,0,1,
128,5,14,14,6,0,0,248,24,24,24,24,24,24,24,24,
24,24,24,24,248,9,6,12,10,0,8,8,0,28,0,54,
0,99,0,193,128,128,128,10,1,2,10,0,255,255,192,4,
3,3,5,0,12,224,96,48,8,11,11,9,0,0,124,127,
3,3,59,123,227,195,199,255,123,9,13,26,10,0,0,64,
0,192,0,192,0,192,0,192,0,222,0,223,0,195,128,193,
128,193,128,195,0,255,0,222,0,8,11,11,9,0,0,30,
63,115,224,192,192,192,224,240,127,30,9,13,26,10,0,0,
0,128,1,128,1,128,1,128,1,128,61,128,125,128,225,128,
193,128,193,128,227,128,127,128,61,128,8,11,11,9,0,0,
60,126,231,195,195,223,222,192,227,127,62,7,13,13,8,0,
0,62,124,96,96,252,248,96,96,96,96,96,96,32,8,13,
13,9,0,0,63,127,227,195,195,195,227,123,51,3,3,127,
254,8,13,13,9,0,0,64,192,192,192,222,223,195,195,195,
195,195,195,130,2,13,13,3,0,0,64,192,128,64,192,192,
192,192,192,192,192,192,128,5,14,14,6,0,255,16,24,24,
8,48,120,24,24,24,24,24,24,120,240,8,13,13,9,0,
0,64,192,192,198,198,204,216,216,216,204,198,199,131,2,14,
14,3,0,0,64,192,192,192,192,192,192,192,192,192,192,192,
192,128,9,11,22,10,0,0,91,0,219,128,201,128,201,128,
201,128,201,128,201,128,201,128,201,128,193,128,129,0,8,11,
11,9,0,0,94,223,195,195,195,195,195,195,195,195,130,8,
11,11,9,0,0,52,118,227,195,195,195,195,195,227,118,52,
8,11,11,9,0,0,252,254,199,195,199,222,220,192,192,192,
128,9,13,26,9,0,255,63,0,127,0,227,0,195,0,195,
0,195,0,251,0,123,0,3,0,3,0,3,128,3,128,3,
128,7,11,11,8,0,0,92,222,224,224,192,192,192,192,192,
192,128,8,11,11,9,0,0,62,127,192,192,240,102,15,3,
3,254,124,6,13,13,7,0,0,32,96,96,252,248,96,96,
96,96,96,96,124,60,8,11,11,9,0,0,65,195,195,195,
195,195,195,195,227,123,58,8,11,11,9,0,0,129,129,195,
195,102,102,102,36,60,24,24,9,11,22,10,0,0,128,128,
193,128,201,128,201,128,201,128,201,128,193,128,221,128,247,128,
227,128,65,0,8,11,11,9,0,0,195,102,102,52,24,24,
24,52,102,102,195,8,12,12,9,0,255,193,227,99,102,110,
44,12,24,24,48,240,224,8,11,11,9,0,0,127,255,7,
6,12,0,48,96,224,255,254,7,14,14,8,0,0,14,28,
24,24,24,48,224,224,48,24,24,24,28,14,2,16,16,5,
1,255,192,192,192,192,192,192,192,192,192,192,192,192,192,192,
192,192,8,14,14,9,0,0,224,112,24,24,24,12,7,7,
12,24,24,24,112,224,10,5,10,11,0,4,48,192,120,192,
204,192,199,128,195,0,5,13,13,6,0,1,248,136,136,136,
136,136,136,136,136,136,136,136,248,8,11,11,9,0,0,252,
254,199,195,199,222,220,192,192,192,128,8,11,11,9,0,0,
30,63,115,224,192,192,192,224,240,127,30,8,11,11,9,0,
0,127,254,24,24,24,24,24,24,24,24,16,8,12,12,9,
0,255,193,227,99,102,110,44,12,24,24,48,240,224,8,12,
12,9,0,255,126,255,219,219,219,219,90,24,24,24,24,16,
8,11,11,9,0,0,195,102,102,52,24,24,24,52,102,102,
195,8,12,12,9,0,255,132,198,198,198,198,198,198,198,198,
254,255,3,8,11,11,9,0,0,65,195,195,195,231,127,63,
3,3,3,2,8,11,11,9,0,0,130,195,195,211,219,219,
219,219,219,203,255,8,12,12,9,0,255,130,195,195,211,219,
219,219,219,218,200,255,3,8,11,11,9,0,0,192,224,96,
96,108,110,103,99,103,126,124,8,11,11,9,0,0,130,195,
195,195,219,221,207,199,207,253,251,8,11,11,9,0,0,64,
192,192,192,220,222,199,195,199,254,252,8,11,11,9,0,0,
124,254,198,3,27,59,3,3,6,254,120,9,11,22,10,0,
0,71,0,207,128,205,128,205,128,221,128,221,128,205,128,205,
128,205,128,207,128,135,0,8,11,11,9,0,0,63,127,227,
195,227,123,59,51,51,115,226,9,14,28,10,0,0,252,0,
254,0,199,0,195,128,193,128,193,128,193,128,253,128,253,128,
193,128,193,128,193,128,193,128,129,0,9,14,28,10,0,0,
223,128,223,0,192,0,192,0,192,0,192,0,222,0,223,0,
195,128,193,128,193,128,195,128,255,0,254,0,9,14,28,10,
0,0,94,0,223,0,195,128,193,128,193,128,195,128,255,0,
255,0,195,128,193,128,193,128,195,128,223,0,190,0,9,14,
28,10,0,0,223,0,223,128,192,0,192,0,192,0,192,0,
192,0,192,0,192,0,192,0,192,0,192,0,192,0,128,0,
9,14,28,10,0,0,11,0,27,0,59,0,115,0,99,0,
99,0,99,0,99,0,99,0,99,0,123,0,251,128,193,128,
193,128,9,14,28,10,0,0,95,128,223,0,192,0,192,0,
192,0,192,0,223,0,222,0,192,0,192,0,192,0,192,0,
223,128,191,0,10,14,28,11,0,0,64,64,192,192,196,192,
204,192,204,192,109,128,109,128,109,128,109,128,204,192,204,192,
204,192,200,192,128,128,9,14,28,10,0,0,122,0,251,0,
131,128,1,128,1,128,3,0,58,0,123,0,3,128,1,128,
1,128,131,128,251,0,120,0,9,14,28,10,0,0,67,128,
195,128,199,128,199,128,199,128,205,128,205,128,205,128,217,128,
217,128,217,128,209,128,209,128,193,0,9,14,28,10,0,0,
91,128,219,128,215,128,199,128,199,128,205,128,205,128,205,128,
217,128,217,128,217,128,209,128,209,128,193,0,9,14,28,10,
0,0,65,128,195,128,199,0,206,0,220,0,216,0,216,0,
216,0,216,0,220,0,206,0,199,0,195,128,65,128,9,14,
28,10,0,0,220,0,222,0,199,0,195,128,193,128,193,128,
193,128,193,128,193,128,193,128,193,128,193,128,193,128,193,128,
9,14,28,10,0,0,193,128,227,128,247,128,247,128,213,128,
193,128,213,128,221,128,221,128,201,128,193,128,193,128,193,128,
129,0,9,14,28,10,0,0,129,0,193,128,193,128,193,128,
193,128,193,128,223,128,223,128,193,128,193,128,193,128,193,128,
193,128,64,128,9,14,28,10,0,0,46,0,111,0,227,128,
193,128,193,128,193,128,193,128,193,128,193,128,193,128,193,128,
227,128,123,0,58,0,9,14,28,10,0,0,223,128,223,128,
193,128,193,128,193,128,193,128,193,128,193,128,193,128,193,128,
193,128,193,128,193,128,129,0,9,14,28,10,0,0,254,0,
255,0,195,128,193,128,193,128,195,128,223,0,222,0,192,0,
192,0,192,0,192,0,192,0,128,0,9,14,28,10,0,0,
14,0,63,0,115,128,97,128,192,0,192,0,192,0,192,0,
192,0,192,0,96,0,112,0,63,128,15,0,9,14,28,10,
0,0,255,0,127,128,0,0,12,0,12,0,12,0,12,0,
12,0,12,0,12,0,12,0,12,0,12,0,4,0,9,14,
28,10,0,0,129,0,193,128,193,128,193,128,193,128,125,128,
61,128,1,128,1,128,1,128,193,128,225,128,127,0,62,0,
10,14,28,11,0,0,63,0,127,128,237,192,204,192,204,192,
237,192,109,128,45,0,12,0,12,0,12,0,12,0,12,0,
4,0,9,14,28,10,0,0,193,128,193,128,193,128,99,0,
99,0,50,0,56,0,28,0,14,0,103,0,99,0,193,128,
193,128,193,128,10,15,30,10,0,255,130,0,195,0,195,0,
195,0,195,0,195,0,195,0,195,0,195,0,195,0,195,0,
195,0,223,0,223,128,1,192,9,14,28,10,0,0,129,0,
193,128,193,128,193,128,193,128,193,128,225,128,125,128,61,128,
1,128,1,128,1,128,1,128,0,128,10,14,28,11,0,0,
128,128,192,192,192,192,192,192,200,192,204,192,204,192,204,192,
204,192,204,192,196,192,192,64,223,128,95,192,11,15,30,11,
0,255,128,128,192,192,192,192,192,192,200,192,204,192,204,192,
204,192,204,192,204,192,196,192,192,64,223,128,95,192,0,224,
9,14,28,10,0,0,224,0,224,0,96,0,96,0,96,0,
96,0,110,0,111,0,99,128,97,128,97,128,99,128,127,0,
62,0,10,14,28,11,0,0,128,128,192,192,192,192,192,192,
192,192,192,192,220,192,222,192,199,64,195,64,195,64,199,64,
254,192,124,192,9,14,28,10,0,0,128,0,192,0,192,0,
192,0,192,0,192,0,222,0,223,0,195,128,193,128,193,128,
195,128,255,0,254,0,9,14,28,10,0,0,62,0,127,0,
227,128,193,128,193,128,1,128,29,128,29,128,1,128,1,128,
193,128,227,128,127,0,62,0,10,14,28,11,0,0,71,0,
207,128,221,192,216,192,216,192,216,192,248,192,248,192,216,192,
216,192,216,192,221,192,207,128,135,0,9,14,28,10,0,0,
63,128,127,128,225,128,193,128,193,128,225,128,125,128,61,128,
29,128,57,128,113,128,225,128,193,128,129,0,8,11,11,9,
0,0,124,127,3,3,59,123,227,195,199,255,123,8,11,11,
9,0,0,7,31,56,112,102,207,195,195,231,126,60,8,11,
11,9,0,0,92,222,198,198,220,222,195,195,199,222,188,8,
11,11,9,0,0,254,255,192,192,192,192,192,192,192,192,128,
10,11,22,11,0,0,31,128,31,128,25,128,49,128,49,128,
49,128,1,128,127,192,255,192,192,192,192,192,8,11,11,9,
0,0,60,126,231,195,195,223,222,192,227,127,62,9,11,22,
10,0,0,64,128,201,128,201,128,107,0,54,0,54,0,107,
0,201,128,201,128,201,128,129,0,8,11,11,9,0,0,116,
246,195,7,126,62,6,3,7,254,124,8,11,11,9,0,0,
65,195,195,199,207,223,219,211,195,195,130,8,11,11,9,0,
0,89,219,211,199,207,223,219,211,195,195,130,8,11,11,9,
0,0,71,207,204,220,216,216,216,220,206,199,67,8,11,11,
9,0,0,27,59,115,227,195,195,195,195,195,195,195,9,11,
22,10,0,0,65,0,227,128,247,128,247,128,213,128,213,128,
213,128,213,128,193,128,193,128,129,0,8,11,11,9,0,0,
65,195,195,251,251,195,195,195,195,195,130,8,11,11,9,0,
0,52,118,227,195,195,195,195,195,227,118,52,8,11,11,9,
0,0,95,223,195,195,195,195,195,195,195,195,130,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255};
За ранее благодарен.
- Войдите на сайт для отправки комментариев
Вс, 28/05/2017 — 13:59
#30
ua6em
Онлайн
Зарегистрирован: 17.08.2016
/*************************************************************************** * Name : DDS_Sweeper.BAS * * Author : Beric Dunn (K6BEZ) * * Notice : Copyright (c) 2013 CC-BY-SA * * : Creative Commons Attribution-ShareAlike 3.0 Unported License * * Date : 9/26/2013 * * Version : 1.0 * * Notes : Written using for the Arduino Micro * * : Pins: * * : A0 - Reverse Detector Analog in * * : A1 - Forward Detector Analog in * * : Modified by Norbert Redeker (DG7EAO) 07/2014 * * : TFT Display mit ILI9341 Chip, SPI, 240 x 320 * * : usglib Grafik Bibliothek https://code.google.com/p/ucglib/ * ***************************************************************************/ #include <SPI.h> #include "Ucglib.h" #include "rusFont.h" // Define Pins used to control AD9850 DDS const int FQ_UD=11; const int SDAT=10; const int SCLK=12; const int RESET=9; // Variablen für Display double vswrArray[110]; //Array für SWR int z = 0; // Index für Array double SwrFreq = 14; // Variable für Freq. mit SWR Min. double SwrMin = 100; // Variable für SWR Min. double Freq1 = 1; // Freq. Links unterste Zeile Display double Freq2 = 15; // Freq. Mitte unterste Zeile Display double Freq3 = 30; // Freq. Mitte unterste Zeile Display unsigned long milliold = 0; //Millisekunden für Entprellung Interrupt unsigned long millinew = 0; //Millisekunden für Entprellung Interrupt int flag = 0; // wir auf 1 gesetzt bei Interrupt, in void Loop perform_sweep double counter = 0; // Zähler um erste Interrupts zu ignorieren // Variablen für Messung double Fstart_MHz = 1; // Start Frequency for sweep double Fstop_MHz = 30; // Stop Frequency for sweep double current_freq_MHz; // Temp variable used during sweep long serial_input_number; // Used to build number from serial stream int num_steps = 100; // Number of steps to use in the sweep char incoming_char; // Character read from serial stream //Konstruktor für Display Ucglib_ST7735_18x128x160_SWSPI ucg(/*sclk=*/ 12, /*data=*/ 10, /*cd=*/ 6 , /*cs=*/ 5, /*reset=*/ 4); // the setup routine runs once when you press reset: void setup() { // Voltmetr analogReference(INTERNAL); float Vbat = (analogRead(A5) * 1.1) / 1023.0; float Vin = Vbat / (69.8 / (783.0 + 69.8)); // R2/(R1+R2) // Schreibe Info Text auf Display ucg.begin(UCG_FONT_MODE_SOLID); ucg.clearScreen(); ucg.setRotate90(); ucg.setFont(ucg_font_9x15_tf); ucg.setColor(255, 255, 255); ucg.setPrintPos(10,20); ucg.print("Arduino Antenna"); ucg.setPrintPos(25,40); ucg.print("SWR Analyzer"); ucg.setPrintPos(35,60); ucg.print("1-30 MHz"); ucg.setPrintPos(20,80); ucg.print("Komsomolsk 2017"); ucg.setPrintPos(5,128); ucg.print("BAT"); ucg.setPrintPos(40,128); ucg.print(Vin, 1); // Configiure DDS control pins for digital output pinMode(FQ_UD,OUTPUT); pinMode(SCLK,OUTPUT); pinMode(SDAT,OUTPUT); pinMode(RESET,OUTPUT); //Tasten Interrupt an PIN 2 pinMode(2,OUTPUT); digitalWrite(2, HIGH); attachInterrupt(0, key2, FALLING); unsigned long milliold = millis(); //Tasten Interrupt an PIN 3 pinMode(3,OUTPUT); digitalWrite(3, HIGH); attachInterrupt(1, key3, FALLING); //milliold = millis(); // Configure LED pin for digital output pinMode(13,OUTPUT); // Set up analog inputs on A0 and A1, internal reference voltage pinMode(A0,INPUT); pinMode(A1,INPUT); analogReference(INTERNAL); // initialize serial communication at 57600 baud Serial.begin(57600); // Reset the DDS digitalWrite(RESET,HIGH); digitalWrite(RESET,LOW); //Initialise the incoming serial number to zero serial_input_number=0; } // the loop routine runs over and over again forever: void loop() { //Check for character if(Serial.available()>0){ incoming_char = Serial.read(); switch(incoming_char){ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': serial_input_number=serial_input_number*10+(incoming_char-'0'); break; case 'A': //Turn frequency into FStart Fstart_MHz = ((double)serial_input_number)/1000000; serial_input_number=0; break; case 'B': //Turn frequency into FStop Fstop_MHz = ((double)serial_input_number)/1000000; serial_input_number=0; break; case 'C': //Turn frequency into FStart and set DDS output to single frequency Fstart_MHz = ((double)serial_input_number)/1000000; //SetDDSFreq(Fstart_MHz); SetDDSFreq(Fstart_MHz * 1000000); delay(100); SetDDSFreq(Fstart_MHz * 1000000); serial_input_number=0; break; case 'N': // Set number of steps in the sweep num_steps = serial_input_number; serial_input_number=0; break; case 'S': case 's': Perform_sweep(); break; case '?': // Report current configuration to PC Serial.print("Start Freq:"); Serial.println(Fstart_MHz*1000000); Serial.print("Stop Freq:"); Serial.println(Fstop_MHz*1000000); Serial.print("Num Steps:"); Serial.println(num_steps); break; } Serial.flush(); } //Perform Sweep nach Interrupt PIN2 oder 3 // ingnoriere Startup Interrupts durch counter if (flag == 1 && counter >2) { flag = 0; Perform_sweep(); } } void Perform_sweep(){ double FWD=0; double REV=0; double VSWR; double Fstep_MHz = (Fstop_MHz-Fstart_MHz)/num_steps; z = 0; SwrMin = 100; ucg.clearScreen(); ucg.setFont(ucg_font_9x15_tf); ucg.setColor(255, 0, 100); ucg.setPrintPos(35,60); ucg.print("Analiz KSW"); // Start loop for(int i=0;i<=num_steps;i++){ // Calculate current frequency current_freq_MHz = Fstart_MHz + i*Fstep_MHz; // Set DDS to current frequency SetDDSFreq(current_freq_MHz*1000000); // Wait a little for settling //delay(10); delay(100); // Read the forward and reverse voltages REV = analogRead(A0); FWD = analogRead(A1); //Offset Korrektur REV = REV-1; if(REV>=FWD){ REV = FWD-1; } if (REV <1) { REV = 1; } VSWR = (FWD+REV)/(FWD-REV); //Skalieren für Ausgabe VSWR = VSWR * 1000; // Send current line back to PC over serial bus Serial.print(current_freq_MHz*1000000); Serial.print(",0,"); Serial.print(VSWR); Serial.print(","); Serial.print(FWD); Serial.print(","); Serial.println(REV); // Übergebe SWR an Array // ERmittele Freq bei niedrigsten SWR vswrArray[z] = VSWR/1000; if (vswrArray[z] > 10) vswrArray[z] = 10; if (vswrArray[z] < SwrMin && vswrArray[z] > 1) { SwrMin = vswrArray[z]; SwrFreq = current_freq_MHz; } z = z + 1; } // Send "End" to PC to indicate end of sweep Serial.println("End"); Serial.flush(); ucg.clearScreen(); //Zeichne Grid CreateGrid(); ucg.setColor(76, 255, 0); // Draw Line double last = 10; double xx = 6; double j = 1; for (int i = 1 ;i < 103; i++){ xx = vswrArray[i]; ucg.drawLine(j,105-last*9, j+1, 105-xx*9); ucg.drawLine(j+1,105-last*9, j+2, 105-xx*9); j = j + 1.5; last = xx; } } // Setze DDS Frequenz void SetDDSFreq(double Freq_Hz){ // Calculate the DDS word - from AD9850 Datasheet int32_t f = Freq_Hz * 4294967295/125000000; // Send one byte at a time for (int b=0;b<4;b++,f>>=8){ send_byte(f & 0xFF); } // 5th byte needs to be zeros send_byte(0); // Strobe the Update pin to tell DDS to use values digitalWrite(FQ_UD,HIGH); digitalWrite(FQ_UD,LOW); } // Sende Daten an DDS void send_byte(byte data_to_send){ // Bit bang the byte over the SPI bus for (int i=0; i<8; i++,data_to_send>>=1){ // Set Data bit on output pin digitalWrite(SDAT,data_to_send & 0x01); // Strobe the clock pin digitalWrite(SCLK,HIGH); digitalWrite(SCLK,LOW); } } //Zeichne Grid auf TFT Display void CreateGrid() { //ucg.clearScreen(); double maxSwr = 10; ucg.setFont(ucg_font_9x15_tf); ucg.drawHLine(0,60,155); ucg.drawHLine(0,98,155); ucg.drawVLine(39,15,90); ucg.drawVLine(78,15,90); ucg.drawVLine(117,15,90); ucg.setPrintPos(0, 118); ucg.print(Freq1,3); ucg.setPrintPos(65, 118); ucg.print(Freq2,3); ucg.setPrintPos(130, 118); ucg.print(Freq3,3); ucg.setPrintPos(1, 11); ucg.print("SWR"); ucg.setPrintPos(30, 11); ucg.print(SwrMin,2); ucg.setPrintPos(65, 11); ucg.print(">"); ucg.setPrintPos(75, 11); ucg.print(maxSwr,2); ucg.setPrintPos(125, 11); ucg.print(SwrFreq,3); ucg.drawRFrame(0,15,155,90, 1); } // Interrupt Service Routine // Abfrage Low an Pin 2 void key2() { //ignoriere Startup Interrupts > counter counter = counter + 1; //Entprellen mit millis() millinew = millis(); if (millinew - milliold < 1000) { milliold = millinew; return; } milliold = millinew; Fstart_MHz = 1; // Start Frequency for sweep Fstop_MHz = 30; // Stop Frequency for sweep num_steps = 102; // Steps Freq1 = 1; // Unterste Zeile Display Freq. Links Freq2 = 15; // Unterste Zeile Display Freq. Mitte Freq3 = 30; // Unterste Zeile Display Freq. Recht //Perform_sweep(); flag = 1; } // Interrupt Service Routine // Abfrage Low an Pin 3 void key3() { //ignoriere Startup Interrupts > counter counter = counter + 1; //Entprellen mit millis() millinew = millis(); if (millinew - milliold < 1000) { milliold = millinew; return; } milliold = millinew; int x = SwrFreq + 0.5; //Runde auf Mhz Fstart_MHz = x-1; // Start Frequency for sweep Fstop_MHz = x+1; // Stop Frequency for sweep num_steps = 102; // Steps Freq1 = x-1; // Unterste Zeile Display Freq. Links Freq2 = x; // Unterste Zeile Display Freq. Mitte Freq3 = x+1; // Unterste Zeile Display Freq. Rechts //Perform_sweep(); flag = 1; } плюс Русский текст , он в том - же скетче- const ucg_fntpgm_uint8_t my14x10rus[4157] UCG_SECTION(".progmem.my14x10") = { 0,11,15,0,255,14,3,35,6,248,32,255,0,15,255,14, 0,0,0,0,8,0,0,2,14,14,4,1,0,64,192,192, 192,192,192,192,192,192,128,0,64,192,128,6,5,5,7,0, 9,68,204,204,204,136,10,14,28,11,0,0,8,128,8,128, 17,0,17,0,127,192,17,0,17,0,34,0,34,0,255,128, 34,0,34,0,68,0,68,0,9,14,28,10,0,0,8,0, 8,0,59,128,123,0,200,0,200,0,232,0,107,0,11,128, 9,128,9,128,111,0,238,0,8,0,8,14,14,9,0,0, 97,179,214,102,12,12,24,24,48,48,102,107,205,134,9,14, 28,10,0,0,56,0,124,0,108,0,108,0,108,0,56,0, 56,128,109,128,199,0,194,0,199,0,237,128,124,128,56,0, 2,5,5,3,0,10,128,192,192,192,64,5,14,14,6,0, 0,24,48,96,96,192,192,192,192,192,192,96,96,48,24,5, 14,14,6,0,0,192,96,48,48,24,24,24,24,24,24,56, 48,96,192,7,7,7,8,0,4,146,214,124,16,124,214,146, 8,10,10,10,0,1,8,24,24,24,127,254,24,24,24,16, 4,6,6,5,0,0,112,96,96,64,192,192,8,2,2,9, 0,5,127,254,3,3,3,4,0,0,224,160,224,8,14,14, 9,0,0,3,3,6,6,12,12,24,24,48,48,96,96,192, 192,9,14,28,10,0,0,62,0,127,0,227,128,197,128,197, 128,197,128,201,128,201,128,209,128,209,128,209,128,227,128,127, 0,62,0,9,14,28,10,0,0,12,0,28,0,60,0,124, 0,8,0,4,0,12,0,12,0,8,0,4,0,12,0,12, 0,127,128,255,128,9,14,28,10,0,0,126,0,255,0,195, 128,193,128,1,128,3,128,63,0,126,0,224,0,192,0,192, 0,192,0,223,128,191,0,9,14,28,10,0,0,126,0,255, 0,195,128,1,128,1,128,3,0,58,0,119,0,3,128,1, 128,1,128,3,128,255,0,126,0,9,14,28,10,0,0,2, 0,6,0,14,0,30,0,62,0,118,0,230,0,198,0,251, 128,247,0,6,0,6,0,6,0,4,0,9,14,28,10,0, 0,127,128,127,128,96,0,96,0,96,0,110,0,111,0,3, 128,1,128,1,128,1,128,195,0,255,0,124,0,9,14,28, 10,0,0,31,0,127,0,96,0,192,0,192,0,192,0,222, 0,223,0,195,128,193,128,193,128,227,0,127,0,60,0,9, 14,28,10,0,0,127,128,255,128,0,0,3,0,3,0,6, 0,6,0,12,0,12,0,24,0,24,0,48,0,48,0,32, 0,9,14,28,10,0,0,58,0,119,0,227,128,193,128,193, 128,99,0,54,0,111,0,227,128,193,128,193,128,227,128,119, 0,46,0,9,14,28,10,0,0,60,0,255,0,231,0,195, 128,193,128,193,128,225,128,253,128,125,128,1,128,3,128,7, 0,127,0,252,0,3,11,11,4,0,2,224,160,224,0,0, 0,0,0,224,160,224,4,13,13,5,0,0,112,80,112,0, 0,0,0,0,112,80,112,96,192,9,11,22,10,0,1,1, 128,3,128,15,0,28,0,120,0,224,0,120,0,28,0,15, 0,3,128,1,128,9,6,12,10,0,4,127,128,255,0,0, 0,0,0,127,128,255,0,9,11,22,10,0,1,192,0,224, 0,120,0,60,0,15,0,3,128,15,0,60,0,120,0,224, 0,192,0,8,14,14,9,0,0,116,238,135,3,3,6,14, 56,48,48,0,0,48,48,9,11,22,10,0,1,62,0,65, 0,128,128,154,128,166,128,162,128,162,128,166,128,155,0,64, 0,63,128,9,14,28,10,0,0,252,0,254,0,199,0,195, 128,193,128,193,128,193,128,253,128,253,128,193,128,193,128,193, 128,193,128,129,0,9,14,28,10,0,0,94,0,223,0,195, 128,193,128,193,128,195,128,255,0,255,0,195,128,193,128,193, 128,195,128,223,0,190,0,9,14,28,10,0,0,14,0,63, 0,115,128,97,128,192,0,192,0,192,0,192,0,192,0,192, 0,96,0,112,0,63,128,15,0,9,14,28,10,0,0,238, 0,111,0,99,128,97,128,97,128,97,128,97,128,97,128,97, 128,97,128,97,128,99,128,111,0,238,0,9,14,28,10,0, 0,95,128,223,0,192,0,192,0,192,0,192,0,223,0,222, 0,192,0,192,0,192,0,192,0,223,128,191,0,9,14,28, 10,0,0,95,128,223,0,192,0,192,0,192,0,192,0,223, 0,222,0,192,0,192,0,192,0,192,0,192,0,128,0,9, 14,28,10,0,0,63,128,127,128,225,128,192,0,192,0,192, 0,192,0,207,128,223,128,193,128,193,128,225,128,127,128,62, 0,9,14,28,10,0,0,129,0,193,128,193,128,193,128,193, 128,193,128,223,128,223,128,193,128,193,128,193,128,193,128,193, 128,64,128,8,14,14,10,1,0,254,127,24,24,24,24,24, 24,24,24,24,24,254,127,9,14,28,10,0,0,31,128,63, 128,1,128,1,128,1,128,1,128,1,128,1,128,1,128,1, 128,1,128,195,128,255,0,62,0,9,14,28,10,0,0,65, 128,195,128,199,0,206,0,220,0,216,0,216,0,216,0,216, 0,220,0,206,0,199,0,195,128,65,128,9,14,28,10,0, 0,64,0,192,0,192,0,192,0,192,0,192,0,192,0,192, 0,192,0,192,0,192,0,192,0,255,128,255,0,9,14,28, 10,0,0,193,128,227,128,247,128,247,128,213,128,193,128,213, 128,221,128,221,128,201,128,193,128,193,128,193,128,129,0,9, 14,28,10,0,0,225,0,225,128,241,128,241,128,249,128,217, 128,221,128,205,128,205,128,197,128,197,128,193,128,193,128,128, 128,9,14,28,10,0,0,46,0,111,0,227,128,193,128,193, 128,193,128,193,128,193,128,193,128,193,128,193,128,227,128,123, 0,58,0,9,14,28,10,0,0,254,0,255,0,195,128,193, 128,193,128,195,128,223,0,222,0,192,0,192,0,192,0,192, 0,192,0,128,0,10,15,30,10,0,255,46,0,111,0,227, 128,193,128,193,128,193,128,193,128,193,128,193,128,193,128,193, 128,227,0,123,128,58,192,0,192,9,14,28,10,0,0,126, 0,255,0,195,128,193,128,193,128,195,128,223,0,220,0,206, 0,199,0,195,128,193,128,193,128,129,0,9,14,28,10,0, 0,62,0,127,0,224,0,192,0,192,0,224,0,118,0,27, 0,3,128,1,128,1,128,3,128,255,128,127,0,9,14,28, 10,0,0,255,0,127,128,0,0,12,0,12,0,12,0,12, 0,12,0,12,0,12,0,12,0,12,0,12,0,4,0,9, 14,28,10,0,0,64,128,193,128,193,128,193,128,193,128,193, 128,193,128,193,128,193,128,193,128,193,128,99,0,127,0,62, 0,9,14,28,10,0,0,227,128,99,0,99,0,99,0,34, 0,54,0,54,0,54,0,20,0,28,0,28,0,28,0,8, 0,8,0,10,14,28,11,0,0,64,64,192,192,192,192,192, 192,192,192,192,192,204,192,204,192,204,192,222,192,222,192,211, 192,193,192,128,192,9,14,28,10,0,0,193,128,193,128,193, 128,99,0,99,0,50,0,56,0,28,0,14,0,103,0,99, 0,193,128,193,128,193,128,10,14,28,10,0,0,192,192,192, 192,97,128,97,128,51,0,63,0,30,0,12,0,8,0,4, 0,12,0,12,0,12,0,8,0,9,14,28,10,0,0,127, 128,255,128,1,128,3,128,7,0,6,0,4,0,16,0,48, 0,112,0,224,0,192,0,255,128,255,0,5,14,14,6,0, 0,248,192,192,192,192,192,192,192,192,192,192,192,192,248,9, 14,28,10,0,0,192,0,96,0,96,0,48,0,48,0,24, 0,24,0,12,0,12,0,6,0,6,0,3,0,3,0,1, 128,5,14,14,6,0,0,248,24,24,24,24,24,24,24,24, 24,24,24,24,248,9,6,12,10,0,8,8,0,28,0,54, 0,99,0,193,128,128,128,10,1,2,10,0,255,255,192,4, 3,3,5,0,12,224,96,48,8,11,11,9,0,0,124,127, 3,3,59,123,227,195,199,255,123,9,13,26,10,0,0,64, 0,192,0,192,0,192,0,192,0,222,0,223,0,195,128,193, 128,193,128,195,0,255,0,222,0,8,11,11,9,0,0,30, 63,115,224,192,192,192,224,240,127,30,9,13,26,10,0,0, 0,128,1,128,1,128,1,128,1,128,61,128,125,128,225,128, 193,128,193,128,227,128,127,128,61,128,8,11,11,9,0,0, 60,126,231,195,195,223,222,192,227,127,62,7,13,13,8,0, 0,62,124,96,96,252,248,96,96,96,96,96,96,32,8,13, 13,9,0,0,63,127,227,195,195,195,227,123,51,3,3,127, 254,8,13,13,9,0,0,64,192,192,192,222,223,195,195,195, 195,195,195,130,2,13,13,3,0,0,64,192,128,64,192,192, 192,192,192,192,192,192,128,5,14,14,6,0,255,16,24,24, 8,48,120,24,24,24,24,24,24,120,240,8,13,13,9,0, 0,64,192,192,198,198,204,216,216,216,204,198,199,131,2,14, 14,3,0,0,64,192,192,192,192,192,192,192,192,192,192,192, 192,128,9,11,22,10,0,0,91,0,219,128,201,128,201,128, 201,128,201,128,201,128,201,128,201,128,193,128,129,0,8,11, 11,9,0,0,94,223,195,195,195,195,195,195,195,195,130,8, 11,11,9,0,0,52,118,227,195,195,195,195,195,227,118,52, 8,11,11,9,0,0,252,254,199,195,199,222,220,192,192,192, 128,9,13,26,9,0,255,63,0,127,0,227,0,195,0,195, 0,195,0,251,0,123,0,3,0,3,0,3,128,3,128,3, 128,7,11,11,8,0,0,92,222,224,224,192,192,192,192,192, 192,128,8,11,11,9,0,0,62,127,192,192,240,102,15,3, 3,254,124,6,13,13,7,0,0,32,96,96,252,248,96,96, 96,96,96,96,124,60,8,11,11,9,0,0,65,195,195,195, 195,195,195,195,227,123,58,8,11,11,9,0,0,129,129,195, 195,102,102,102,36,60,24,24,9,11,22,10,0,0,128,128, 193,128,201,128,201,128,201,128,201,128,193,128,221,128,247,128, 227,128,65,0,8,11,11,9,0,0,195,102,102,52,24,24, 24,52,102,102,195,8,12,12,9,0,255,193,227,99,102,110, 44,12,24,24,48,240,224,8,11,11,9,0,0,127,255,7, 6,12,0,48,96,224,255,254,7,14,14,8,0,0,14,28, 24,24,24,48,224,224,48,24,24,24,28,14,2,16,16,5, 1,255,192,192,192,192,192,192,192,192,192,192,192,192,192,192, 192,192,8,14,14,9,0,0,224,112,24,24,24,12,7,7, 12,24,24,24,112,224,10,5,10,11,0,4,48,192,120,192, 204,192,199,128,195,0,5,13,13,6,0,1,248,136,136,136, 136,136,136,136,136,136,136,136,248,8,11,11,9,0,0,252, 254,199,195,199,222,220,192,192,192,128,8,11,11,9,0,0, 30,63,115,224,192,192,192,224,240,127,30,8,11,11,9,0, 0,127,254,24,24,24,24,24,24,24,24,16,8,12,12,9, 0,255,193,227,99,102,110,44,12,24,24,48,240,224,8,12, 12,9,0,255,126,255,219,219,219,219,90,24,24,24,24,16, 8,11,11,9,0,0,195,102,102,52,24,24,24,52,102,102, 195,8,12,12,9,0,255,132,198,198,198,198,198,198,198,198, 254,255,3,8,11,11,9,0,0,65,195,195,195,231,127,63, 3,3,3,2,8,11,11,9,0,0,130,195,195,211,219,219, 219,219,219,203,255,8,12,12,9,0,255,130,195,195,211,219, 219,219,219,218,200,255,3,8,11,11,9,0,0,192,224,96, 96,108,110,103,99,103,126,124,8,11,11,9,0,0,130,195, 195,195,219,221,207,199,207,253,251,8,11,11,9,0,0,64, 192,192,192,220,222,199,195,199,254,252,8,11,11,9,0,0, 124,254,198,3,27,59,3,3,6,254,120,9,11,22,10,0, 0,71,0,207,128,205,128,205,128,221,128,221,128,205,128,205, 128,205,128,207,128,135,0,8,11,11,9,0,0,63,127,227, 195,227,123,59,51,51,115,226,9,14,28,10,0,0,252,0, 254,0,199,0,195,128,193,128,193,128,193,128,253,128,253,128, 193,128,193,128,193,128,193,128,129,0,9,14,28,10,0,0, 223,128,223,0,192,0,192,0,192,0,192,0,222,0,223,0, 195,128,193,128,193,128,195,128,255,0,254,0,9,14,28,10, 0,0,94,0,223,0,195,128,193,128,193,128,195,128,255,0, 255,0,195,128,193,128,193,128,195,128,223,0,190,0,9,14, 28,10,0,0,223,0,223,128,192,0,192,0,192,0,192,0, 192,0,192,0,192,0,192,0,192,0,192,0,192,0,128,0, 9,14,28,10,0,0,11,0,27,0,59,0,115,0,99,0, 99,0,99,0,99,0,99,0,99,0,123,0,251,128,193,128, 193,128,9,14,28,10,0,0,95,128,223,0,192,0,192,0, 192,0,192,0,223,0,222,0,192,0,192,0,192,0,192,0, 223,128,191,0,10,14,28,11,0,0,64,64,192,192,196,192, 204,192,204,192,109,128,109,128,109,128,109,128,204,192,204,192, 204,192,200,192,128,128,9,14,28,10,0,0,122,0,251,0, 131,128,1,128,1,128,3,0,58,0,123,0,3,128,1,128, 1,128,131,128,251,0,120,0,9,14,28,10,0,0,67,128, 195,128,199,128,199,128,199,128,205,128,205,128,205,128,217,128, 217,128,217,128,209,128,209,128,193,0,9,14,28,10,0,0, 91,128,219,128,215,128,199,128,199,128,205,128,205,128,205,128, 217,128,217,128,217,128,209,128,209,128,193,0,9,14,28,10, 0,0,65,128,195,128,199,0,206,0,220,0,216,0,216,0, 216,0,216,0,220,0,206,0,199,0,195,128,65,128,9,14, 28,10,0,0,220,0,222,0,199,0,195,128,193,128,193,128, 193,128,193,128,193,128,193,128,193,128,193,128,193,128,193,128, 9,14,28,10,0,0,193,128,227,128,247,128,247,128,213,128, 193,128,213,128,221,128,221,128,201,128,193,128,193,128,193,128, 129,0,9,14,28,10,0,0,129,0,193,128,193,128,193,128, 193,128,193,128,223,128,223,128,193,128,193,128,193,128,193,128, 193,128,64,128,9,14,28,10,0,0,46,0,111,0,227,128, 193,128,193,128,193,128,193,128,193,128,193,128,193,128,193,128, 227,128,123,0,58,0,9,14,28,10,0,0,223,128,223,128, 193,128,193,128,193,128,193,128,193,128,193,128,193,128,193,128, 193,128,193,128,193,128,129,0,9,14,28,10,0,0,254,0, 255,0,195,128,193,128,193,128,195,128,223,0,222,0,192,0, 192,0,192,0,192,0,192,0,128,0,9,14,28,10,0,0, 14,0,63,0,115,128,97,128,192,0,192,0,192,0,192,0, 192,0,192,0,96,0,112,0,63,128,15,0,9,14,28,10, 0,0,255,0,127,128,0,0,12,0,12,0,12,0,12,0, 12,0,12,0,12,0,12,0,12,0,12,0,4,0,9,14, 28,10,0,0,129,0,193,128,193,128,193,128,193,128,125,128, 61,128,1,128,1,128,1,128,193,128,225,128,127,0,62,0, 10,14,28,11,0,0,63,0,127,128,237,192,204,192,204,192, 237,192,109,128,45,0,12,0,12,0,12,0,12,0,12,0, 4,0,9,14,28,10,0,0,193,128,193,128,193,128,99,0, 99,0,50,0,56,0,28,0,14,0,103,0,99,0,193,128, 193,128,193,128,10,15,30,10,0,255,130,0,195,0,195,0, 195,0,195,0,195,0,195,0,195,0,195,0,195,0,195,0, 195,0,223,0,223,128,1,192,9,14,28,10,0,0,129,0, 193,128,193,128,193,128,193,128,193,128,225,128,125,128,61,128, 1,128,1,128,1,128,1,128,0,128,10,14,28,11,0,0, 128,128,192,192,192,192,192,192,200,192,204,192,204,192,204,192, 204,192,204,192,196,192,192,64,223,128,95,192,11,15,30,11, 0,255,128,128,192,192,192,192,192,192,200,192,204,192,204,192, 204,192,204,192,204,192,196,192,192,64,223,128,95,192,0,224, 9,14,28,10,0,0,224,0,224,0,96,0,96,0,96,0, 96,0,110,0,111,0,99,128,97,128,97,128,99,128,127,0, 62,0,10,14,28,11,0,0,128,128,192,192,192,192,192,192, 192,192,192,192,220,192,222,192,199,64,195,64,195,64,199,64, 254,192,124,192,9,14,28,10,0,0,128,0,192,0,192,0, 192,0,192,0,192,0,222,0,223,0,195,128,193,128,193,128, 195,128,255,0,254,0,9,14,28,10,0,0,62,0,127,0, 227,128,193,128,193,128,1,128,29,128,29,128,1,128,1,128, 193,128,227,128,127,0,62,0,10,14,28,11,0,0,71,0, 207,128,221,192,216,192,216,192,216,192,248,192,248,192,216,192, 216,192,216,192,221,192,207,128,135,0,9,14,28,10,0,0, 63,128,127,128,225,128,193,128,193,128,225,128,125,128,61,128, 29,128,57,128,113,128,225,128,193,128,129,0,8,11,11,9, 0,0,124,127,3,3,59,123,227,195,199,255,123,8,11,11, 9,0,0,7,31,56,112,102,207,195,195,231,126,60,8,11, 11,9,0,0,92,222,198,198,220,222,195,195,199,222,188,8, 11,11,9,0,0,254,255,192,192,192,192,192,192,192,192,128, 10,11,22,11,0,0,31,128,31,128,25,128,49,128,49,128, 49,128,1,128,127,192,255,192,192,192,192,192,8,11,11,9, 0,0,60,126,231,195,195,223,222,192,227,127,62,9,11,22, 10,0,0,64,128,201,128,201,128,107,0,54,0,54,0,107, 0,201,128,201,128,201,128,129,0,8,11,11,9,0,0,116, 246,195,7,126,62,6,3,7,254,124,8,11,11,9,0,0, 65,195,195,199,207,223,219,211,195,195,130,8,11,11,9,0, 0,89,219,211,199,207,223,219,211,195,195,130,8,11,11,9, 0,0,71,207,204,220,216,216,216,220,206,199,67,8,11,11, 9,0,0,27,59,115,227,195,195,195,195,195,195,195,9,11, 22,10,0,0,65,0,227,128,247,128,247,128,213,128,213,128, 213,128,213,128,193,128,193,128,129,0,8,11,11,9,0,0, 65,195,195,251,251,195,195,195,195,195,130,8,11,11,9,0, 0,52,118,227,195,195,195,195,195,227,118,52,8,11,11,9, 0,0,95,223,195,195,195,195,195,195,195,195,130,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255};
Выкладывать надо по правилам форума
- Войдите на сайт для отправки комментариев
Вс, 28/05/2017 — 14:36
#31
DAFdriver
Offline
Зарегистрирован: 12.08.2016
Извиняюсь это мое первое сообщение.
- Войдите на сайт для отправки комментариев
Вс, 28/05/2017 — 19:27
#32
Jeka_M
Offline
Зарегистрирован: 06.07.2014
DAFdriver пишет:
И сразу проблемка — неполучается прошить arduino nano .
Информации недостаточно. Расшифруйте подробно ваше «неполучается прошить».
- Войдите на сайт для отправки комментариев
Вс, 28/05/2017 — 19:42
#33
DAFdriver
Offline
Зарегистрирован: 12.08.2016
Пишет ошибка компиляции
Arduino: 1.8.1 (Windows 7), Плата:»Arduino Nano, ATmega328″
C:Program Files (x86)ArduinolibrariesDDS_sweeper1_TFT_ST7735_128x160_v4_hwspiDDS_sweeper1_TFT_ST7735_128x160_v4_hwspi.ino:18:20: fatal error: Ucglib.h: No such file or directory
#include «Ucglib.h»
^
compilation terminated.
exit status 1
Ошибка компиляции для платы Arduino Nano.
Этот отчёт будет иметь больше информации с
включенной опцией Файл -> Настройки ->
«Показать подробный вывод во время компиляции»
вот сподключеной ардуиной
Arduino: 1.8.1 (Windows 7), Плата:»Arduino Nano, ATmega328″
C:Program Files (x86)ArduinolibrariesDDS_sweeper1_TFT_ST7735_128x160_v4_hwspiDDS_sweeper1_TFT_ST7735_128x160_v4_hwspi.ino:18:20: fatal error: Ucglib.h: No such file or directory
#include «Ucglib.h»
^
compilation terminated.
exit status 1
Ошибка компиляции для платы Arduino Nano.
Неверная библиотека найдена в C:Program Files (x86)Arduinolibrariesad9850adafuilt: C:Program Files (x86)Arduinolibrariesad9850adafuilt
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesTFT-Shield-Example-Code-master: C:Program Files (x86)ArduinolibrariesTFT-Shield-Example-Code-master
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesTFT_Touch_Shield: C:Program Files (x86)ArduinolibrariesTFT_Touch_Shield
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesTSCalibration: C:Program Files (x86)ArduinolibrariesTSCalibration
Неверная библиотека найдена в C:Program Files (x86)Arduinolibrariesad9850adafuilt: C:Program Files (x86)Arduinolibrariesad9850adafuilt
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesTFT-Shield-Example-Code-master: C:Program Files (x86)ArduinolibrariesTFT-Shield-Example-Code-master
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesTFT_Touch_Shield: C:Program Files (x86)ArduinolibrariesTFT_Touch_Shield
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesTSCalibration: C:Program Files (x86)ArduinolibrariesTSCalibration
Этот отчёт будет иметь больше информации с
включенной опцией Файл -> Настройки ->
«Показать подробный вывод во время компиляции»
- Войдите на сайт для отправки комментариев
Вс, 28/05/2017 — 19:41
#34
vovan_UA
Offline
Зарегистрирован: 27.05.2017
ну а с моими ошибками кто подскажет что делать если это возможно конечно
Скетч использует 21464 байт (69%) памяти устройства. Всего доступно 30720 байт.
Глобальные переменные используют 977 байт (47%) динамической памяти, оставляя 1071 байт для локальных переменных. Максимум: 2048 байт.
avrdude: verification error, first mismatch at byte 0x0042
0xf1 != 0x1d
avrdude: verification error; content mismatch
avrdude: verification error; content mismatch
- Войдите на сайт для отправки комментариев
Вс, 28/05/2017 — 20:40
#35
T.Rook
Offline
Зарегистрирован: 05.03.2016
DAFdriver пишет:
DDS_sweeper1_TFT_ST7735_128x160_v4_hwspi.ino:18:20: fatal error: Ucglib.h: No such file or directory
#include «Ucglib.h»
нет бибиотеки (или не найдена) Ucglib.h. Т.к. в скетче написано «Ucglib.h» то библтотека ожидается в каталоге файла «.ino». Если библиотека лежит в libraries, то исправьте на: #include <Ucglib.h>
- Войдите на сайт для отправки комментариев
Вс, 28/05/2017 — 20:49
#36
T.Rook
Offline
Зарегистрирован: 05.03.2016
vovan_UA пишет:
ну а с моими ошибками кто подскажет что делать если это возможно конечно
avrdude: verification error, first mismatch at byte 0x0042
0xf1 != 0x1d
Если Вы полностью исключаете сбои по питанию (и ресету), и ошибка всегда на одном месте (на разных скетчах) «first mismatch at byte 0x0042» — то в мусор
UPD: хотя ВОТ написано что подобное было из-за драйвера
- Войдите на сайт для отправки комментариев
Вс, 28/05/2017 — 20:54
#37
vovan_UA
Offline
Зарегистрирован: 27.05.2017
Да вот как раз ошибка всегда на одном месте а так врди загрузка проходит нормально единственое при проверке и возникает эта ошибка а загрузчик не мог слететь случайно или это уже самой памяти гаплык просто это пошло после ппытки загрузить скетч при помощи XLoader хотя рание было все нормально
- Войдите на сайт для отправки комментариев
Вс, 28/05/2017 — 21:04
#38
T.Rook
Offline
Зарегистрирован: 05.03.2016
vovan_UA пишет:
Да вот как раз ошибка всегда на одном месте а так врди загрузка проходит нормально единственое при проверке и возникает эта ошибка а загрузчик не мог слететь случайно или это уже самой памяти гаплык просто это пошло после ппытки загрузить скетч при помощи XLoader хотя рание было все нормально
Это легко проверить: пробовали перезаписать загрузчик?
- Войдите на сайт для отправки комментариев
Вс, 28/05/2017 — 21:15
#39
qwone
Offline
Зарегистрирован: 03.07.2016
DAFdriver
Ucglib.h: No such file or directory // нет файла в директории #include "Ucglib.h" ^ //<--а вот вам стрелочкой компилятор показывает compilation terminated.
Нельзя же быть таким безголовым
- Войдите на сайт для отправки комментариев
Вс, 28/05/2017 — 21:15
#40
DAFdriver
Offline
Зарегистрирован: 12.08.2016
Так что на чтои где исправить.Я в этом деле зеленый бегемот.
- Войдите на сайт для отправки комментариев
Вс, 28/05/2017 — 21:22
#41
qwone
Offline
Зарегистрирован: 03.07.2016
#include "Ucglib.h" //<-это можно найти здесь https://code.google.com/p/ucglib/ * #include "rusFont.h" //<- а вот это хер знает где и не беритесь за сложные проекты это вам не игры на планшет заливать
- Войдите на сайт для отправки комментариев
Вс, 28/05/2017 — 21:47
#42
DAFdriver
Offline
Зарегистрирован: 12.08.2016
Спасибо буду пытаться. На счет игр мне 56лет ,я ими не занимаюсь . Занимаюсь настройкой CI-Bi антенн и ремонтом радиостанций , устанавливааю и обслуживаю пожарные , охранные сигнализации и видео наблюдение. Там приходится пршивать датчики и приборы , нотам все проще .
- Войдите на сайт для отправки комментариев
Вс, 28/05/2017 — 21:58
#43
vovan_UA
Offline
Зарегистрирован: 27.05.2017
T.Rook пишет:
Это легко проверить: пробовали перезаписать загрузчик?
Не пробовал просто незнаю как с таким столкнулся в первые а из самой среды не получается выдает ошибку пробовал и при помощи USBASP он ее вобще отказывается видить а этот PL2303HX видит ну так же выдает шибку а как ещо просто незна есть ещо в наличие R3 MEGA328P ATMEGA16U2 со сьемной микрухой ну вот как к нему правильно подключится найти не могу
- Войдите на сайт для отправки комментариев
Пнд, 29/05/2017 — 00:48
#44
T.Rook
Offline
Зарегистрирован: 05.03.2016
vovan_UA пишет:
Не пробовал просто незнаю как с таким столкнулся в первые а из самой среды не получается выдает ошибку пробовал и при помощи USBASP он ее вобще отказывается видить а этот PL2303HX видит ну так же выдает шибку а как ещо просто незна есть ещо в наличие R3 MEGA328P ATMEGA16U2 со сьемной микрухой ну вот как к нему правильно подключится найти не могу
Легко гуглится по «arduino isp программатор».
В качестве немного бредовой идеи на «поискать и почитать много непонятного»: если вылетела одна ячейка, то, наверное. можно натйти опции компиляции HEX файла, что бы рабочий код начинался после сбойного адреса. Может кто подскажет vovan_UA?
- Войдите на сайт для отправки комментариев
Пнд, 29/05/2017 — 07:30
#45
vovan_UA
Offline
Зарегистрирован: 27.05.2017
T.Rook пишет:
UPD: хотя ВОТ написано что подобное было из-за драйвера
Ну с драйверами тут все в порядке прост у меня таких платок несколько и в другую все записалось без проблем а с этой непонятка такая и такое ощущение что прсто предыдущая прошивка сидит внутри и невкаку не хочет затираться
- Войдите на сайт для отправки комментариев
Пнд, 29/05/2017 — 08:57
#46
ua6em
Онлайн
Зарегистрирован: 17.08.2016
qwone пишет:
#include "rusFont.h" //<- а вот это хер знает где
А это разве не оно?
Добавить в проект файлик с этим имененм и содержимое в этот файл разместить, или я что-то путаю???
const ucg_fntpgm_uint8_t my14x10rus[4157] UCG_SECTION(«.progmem.my14x10») = {
0,11,15,0,255,14,3,35,6,248,32,255,0,15,255,14,……………………………….
Файлик «rusFont.h» — файлик должен лежать в каталоге со скетчем
const ucg_fntpgm_uint8_t my14x10rus[4157] UCG_SECTION(".progmem.my14x10") = { 0,11,15,0,255,14,3,35,6,248,32,255,0,15,255,14, 0,0,0,0,8,0,0,2,14,14,4,1,0,64,192,192, 192,192,192,192,192,192,128,0,64,192,128,6,5,5,7,0, 9,68,204,204,204,136,10,14,28,11,0,0,8,128,8,128, 17,0,17,0,127,192,17,0,17,0,34,0,34,0,255,128, 34,0,34,0,68,0,68,0,9,14,28,10,0,0,8,0, 8,0,59,128,123,0,200,0,200,0,232,0,107,0,11,128, 9,128,9,128,111,0,238,0,8,0,8,14,14,9,0,0, 97,179,214,102,12,12,24,24,48,48,102,107,205,134,9,14, 28,10,0,0,56,0,124,0,108,0,108,0,108,0,56,0, 56,128,109,128,199,0,194,0,199,0,237,128,124,128,56,0, 2,5,5,3,0,10,128,192,192,192,64,5,14,14,6,0, 0,24,48,96,96,192,192,192,192,192,192,96,96,48,24,5, 14,14,6,0,0,192,96,48,48,24,24,24,24,24,24,56, 48,96,192,7,7,7,8,0,4,146,214,124,16,124,214,146, 8,10,10,10,0,1,8,24,24,24,127,254,24,24,24,16, 4,6,6,5,0,0,112,96,96,64,192,192,8,2,2,9, 0,5,127,254,3,3,3,4,0,0,224,160,224,8,14,14, 9,0,0,3,3,6,6,12,12,24,24,48,48,96,96,192, 192,9,14,28,10,0,0,62,0,127,0,227,128,197,128,197, 128,197,128,201,128,201,128,209,128,209,128,209,128,227,128,127, 0,62,0,9,14,28,10,0,0,12,0,28,0,60,0,124, 0,8,0,4,0,12,0,12,0,8,0,4,0,12,0,12, 0,127,128,255,128,9,14,28,10,0,0,126,0,255,0,195, 128,193,128,1,128,3,128,63,0,126,0,224,0,192,0,192, 0,192,0,223,128,191,0,9,14,28,10,0,0,126,0,255, 0,195,128,1,128,1,128,3,0,58,0,119,0,3,128,1, 128,1,128,3,128,255,0,126,0,9,14,28,10,0,0,2, 0,6,0,14,0,30,0,62,0,118,0,230,0,198,0,251, 128,247,0,6,0,6,0,6,0,4,0,9,14,28,10,0, 0,127,128,127,128,96,0,96,0,96,0,110,0,111,0,3, 128,1,128,1,128,1,128,195,0,255,0,124,0,9,14,28, 10,0,0,31,0,127,0,96,0,192,0,192,0,192,0,222, 0,223,0,195,128,193,128,193,128,227,0,127,0,60,0,9, 14,28,10,0,0,127,128,255,128,0,0,3,0,3,0,6, 0,6,0,12,0,12,0,24,0,24,0,48,0,48,0,32, 0,9,14,28,10,0,0,58,0,119,0,227,128,193,128,193, 128,99,0,54,0,111,0,227,128,193,128,193,128,227,128,119, 0,46,0,9,14,28,10,0,0,60,0,255,0,231,0,195, 128,193,128,193,128,225,128,253,128,125,128,1,128,3,128,7, 0,127,0,252,0,3,11,11,4,0,2,224,160,224,0,0, 0,0,0,224,160,224,4,13,13,5,0,0,112,80,112,0, 0,0,0,0,112,80,112,96,192,9,11,22,10,0,1,1, 128,3,128,15,0,28,0,120,0,224,0,120,0,28,0,15, 0,3,128,1,128,9,6,12,10,0,4,127,128,255,0,0, 0,0,0,127,128,255,0,9,11,22,10,0,1,192,0,224, 0,120,0,60,0,15,0,3,128,15,0,60,0,120,0,224, 0,192,0,8,14,14,9,0,0,116,238,135,3,3,6,14, 56,48,48,0,0,48,48,9,11,22,10,0,1,62,0,65, 0,128,128,154,128,166,128,162,128,162,128,166,128,155,0,64, 0,63,128,9,14,28,10,0,0,252,0,254,0,199,0,195, 128,193,128,193,128,193,128,253,128,253,128,193,128,193,128,193, 128,193,128,129,0,9,14,28,10,0,0,94,0,223,0,195, 128,193,128,193,128,195,128,255,0,255,0,195,128,193,128,193, 128,195,128,223,0,190,0,9,14,28,10,0,0,14,0,63, 0,115,128,97,128,192,0,192,0,192,0,192,0,192,0,192, 0,96,0,112,0,63,128,15,0,9,14,28,10,0,0,238, 0,111,0,99,128,97,128,97,128,97,128,97,128,97,128,97, 128,97,128,97,128,99,128,111,0,238,0,9,14,28,10,0, 0,95,128,223,0,192,0,192,0,192,0,192,0,223,0,222, 0,192,0,192,0,192,0,192,0,223,128,191,0,9,14,28, 10,0,0,95,128,223,0,192,0,192,0,192,0,192,0,223, 0,222,0,192,0,192,0,192,0,192,0,192,0,128,0,9, 14,28,10,0,0,63,128,127,128,225,128,192,0,192,0,192, 0,192,0,207,128,223,128,193,128,193,128,225,128,127,128,62, 0,9,14,28,10,0,0,129,0,193,128,193,128,193,128,193, 128,193,128,223,128,223,128,193,128,193,128,193,128,193,128,193, 128,64,128,8,14,14,10,1,0,254,127,24,24,24,24,24, 24,24,24,24,24,254,127,9,14,28,10,0,0,31,128,63, 128,1,128,1,128,1,128,1,128,1,128,1,128,1,128,1, 128,1,128,195,128,255,0,62,0,9,14,28,10,0,0,65, 128,195,128,199,0,206,0,220,0,216,0,216,0,216,0,216, 0,220,0,206,0,199,0,195,128,65,128,9,14,28,10,0, 0,64,0,192,0,192,0,192,0,192,0,192,0,192,0,192, 0,192,0,192,0,192,0,192,0,255,128,255,0,9,14,28, 10,0,0,193,128,227,128,247,128,247,128,213,128,193,128,213, 128,221,128,221,128,201,128,193,128,193,128,193,128,129,0,9, 14,28,10,0,0,225,0,225,128,241,128,241,128,249,128,217, 128,221,128,205,128,205,128,197,128,197,128,193,128,193,128,128, 128,9,14,28,10,0,0,46,0,111,0,227,128,193,128,193, 128,193,128,193,128,193,128,193,128,193,128,193,128,227,128,123, 0,58,0,9,14,28,10,0,0,254,0,255,0,195,128,193, 128,193,128,195,128,223,0,222,0,192,0,192,0,192,0,192, 0,192,0,128,0,10,15,30,10,0,255,46,0,111,0,227, 128,193,128,193,128,193,128,193,128,193,128,193,128,193,128,193, 128,227,0,123,128,58,192,0,192,9,14,28,10,0,0,126, 0,255,0,195,128,193,128,193,128,195,128,223,0,220,0,206, 0,199,0,195,128,193,128,193,128,129,0,9,14,28,10,0, 0,62,0,127,0,224,0,192,0,192,0,224,0,118,0,27, 0,3,128,1,128,1,128,3,128,255,128,127,0,9,14,28, 10,0,0,255,0,127,128,0,0,12,0,12,0,12,0,12, 0,12,0,12,0,12,0,12,0,12,0,12,0,4,0,9, 14,28,10,0,0,64,128,193,128,193,128,193,128,193,128,193, 128,193,128,193,128,193,128,193,128,193,128,99,0,127,0,62, 0,9,14,28,10,0,0,227,128,99,0,99,0,99,0,34, 0,54,0,54,0,54,0,20,0,28,0,28,0,28,0,8, 0,8,0,10,14,28,11,0,0,64,64,192,192,192,192,192, 192,192,192,192,192,204,192,204,192,204,192,222,192,222,192,211, 192,193,192,128,192,9,14,28,10,0,0,193,128,193,128,193, 128,99,0,99,0,50,0,56,0,28,0,14,0,103,0,99, 0,193,128,193,128,193,128,10,14,28,10,0,0,192,192,192, 192,97,128,97,128,51,0,63,0,30,0,12,0,8,0,4, 0,12,0,12,0,12,0,8,0,9,14,28,10,0,0,127, 128,255,128,1,128,3,128,7,0,6,0,4,0,16,0,48, 0,112,0,224,0,192,0,255,128,255,0,5,14,14,6,0, 0,248,192,192,192,192,192,192,192,192,192,192,192,192,248,9, 14,28,10,0,0,192,0,96,0,96,0,48,0,48,0,24, 0,24,0,12,0,12,0,6,0,6,0,3,0,3,0,1, 128,5,14,14,6,0,0,248,24,24,24,24,24,24,24,24, 24,24,24,24,248,9,6,12,10,0,8,8,0,28,0,54, 0,99,0,193,128,128,128,10,1,2,10,0,255,255,192,4, 3,3,5,0,12,224,96,48,8,11,11,9,0,0,124,127, 3,3,59,123,227,195,199,255,123,9,13,26,10,0,0,64, 0,192,0,192,0,192,0,192,0,222,0,223,0,195,128,193, 128,193,128,195,0,255,0,222,0,8,11,11,9,0,0,30, 63,115,224,192,192,192,224,240,127,30,9,13,26,10,0,0, 0,128,1,128,1,128,1,128,1,128,61,128,125,128,225,128, 193,128,193,128,227,128,127,128,61,128,8,11,11,9,0,0, 60,126,231,195,195,223,222,192,227,127,62,7,13,13,8,0, 0,62,124,96,96,252,248,96,96,96,96,96,96,32,8,13, 13,9,0,0,63,127,227,195,195,195,227,123,51,3,3,127, 254,8,13,13,9,0,0,64,192,192,192,222,223,195,195,195, 195,195,195,130,2,13,13,3,0,0,64,192,128,64,192,192, 192,192,192,192,192,192,128,5,14,14,6,0,255,16,24,24, 8,48,120,24,24,24,24,24,24,120,240,8,13,13,9,0, 0,64,192,192,198,198,204,216,216,216,204,198,199,131,2,14, 14,3,0,0,64,192,192,192,192,192,192,192,192,192,192,192, 192,128,9,11,22,10,0,0,91,0,219,128,201,128,201,128, 201,128,201,128,201,128,201,128,201,128,193,128,129,0,8,11, 11,9,0,0,94,223,195,195,195,195,195,195,195,195,130,8, 11,11,9,0,0,52,118,227,195,195,195,195,195,227,118,52, 8,11,11,9,0,0,252,254,199,195,199,222,220,192,192,192, 128,9,13,26,9,0,255,63,0,127,0,227,0,195,0,195, 0,195,0,251,0,123,0,3,0,3,0,3,128,3,128,3, 128,7,11,11,8,0,0,92,222,224,224,192,192,192,192,192, 192,128,8,11,11,9,0,0,62,127,192,192,240,102,15,3, 3,254,124,6,13,13,7,0,0,32,96,96,252,248,96,96, 96,96,96,96,124,60,8,11,11,9,0,0,65,195,195,195, 195,195,195,195,227,123,58,8,11,11,9,0,0,129,129,195, 195,102,102,102,36,60,24,24,9,11,22,10,0,0,128,128, 193,128,201,128,201,128,201,128,201,128,193,128,221,128,247,128, 227,128,65,0,8,11,11,9,0,0,195,102,102,52,24,24, 24,52,102,102,195,8,12,12,9,0,255,193,227,99,102,110, 44,12,24,24,48,240,224,8,11,11,9,0,0,127,255,7, 6,12,0,48,96,224,255,254,7,14,14,8,0,0,14,28, 24,24,24,48,224,224,48,24,24,24,28,14,2,16,16,5, 1,255,192,192,192,192,192,192,192,192,192,192,192,192,192,192, 192,192,8,14,14,9,0,0,224,112,24,24,24,12,7,7, 12,24,24,24,112,224,10,5,10,11,0,4,48,192,120,192, 204,192,199,128,195,0,5,13,13,6,0,1,248,136,136,136, 136,136,136,136,136,136,136,136,248,8,11,11,9,0,0,252, 254,199,195,199,222,220,192,192,192,128,8,11,11,9,0,0, 30,63,115,224,192,192,192,224,240,127,30,8,11,11,9,0, 0,127,254,24,24,24,24,24,24,24,24,16,8,12,12,9, 0,255,193,227,99,102,110,44,12,24,24,48,240,224,8,12, 12,9,0,255,126,255,219,219,219,219,90,24,24,24,24,16, 8,11,11,9,0,0,195,102,102,52,24,24,24,52,102,102, 195,8,12,12,9,0,255,132,198,198,198,198,198,198,198,198, 254,255,3,8,11,11,9,0,0,65,195,195,195,231,127,63, 3,3,3,2,8,11,11,9,0,0,130,195,195,211,219,219, 219,219,219,203,255,8,12,12,9,0,255,130,195,195,211,219, 219,219,219,218,200,255,3,8,11,11,9,0,0,192,224,96, 96,108,110,103,99,103,126,124,8,11,11,9,0,0,130,195, 195,195,219,221,207,199,207,253,251,8,11,11,9,0,0,64, 192,192,192,220,222,199,195,199,254,252,8,11,11,9,0,0, 124,254,198,3,27,59,3,3,6,254,120,9,11,22,10,0, 0,71,0,207,128,205,128,205,128,221,128,221,128,205,128,205, 128,205,128,207,128,135,0,8,11,11,9,0,0,63,127,227, 195,227,123,59,51,51,115,226,9,14,28,10,0,0,252,0, 254,0,199,0,195,128,193,128,193,128,193,128,253,128,253,128, 193,128,193,128,193,128,193,128,129,0,9,14,28,10,0,0, 223,128,223,0,192,0,192,0,192,0,192,0,222,0,223,0, 195,128,193,128,193,128,195,128,255,0,254,0,9,14,28,10, 0,0,94,0,223,0,195,128,193,128,193,128,195,128,255,0, 255,0,195,128,193,128,193,128,195,128,223,0,190,0,9,14, 28,10,0,0,223,0,223,128,192,0,192,0,192,0,192,0, 192,0,192,0,192,0,192,0,192,0,192,0,192,0,128,0, 9,14,28,10,0,0,11,0,27,0,59,0,115,0,99,0, 99,0,99,0,99,0,99,0,99,0,123,0,251,128,193,128, 193,128,9,14,28,10,0,0,95,128,223,0,192,0,192,0, 192,0,192,0,223,0,222,0,192,0,192,0,192,0,192,0, 223,128,191,0,10,14,28,11,0,0,64,64,192,192,196,192, 204,192,204,192,109,128,109,128,109,128,109,128,204,192,204,192, 204,192,200,192,128,128,9,14,28,10,0,0,122,0,251,0, 131,128,1,128,1,128,3,0,58,0,123,0,3,128,1,128, 1,128,131,128,251,0,120,0,9,14,28,10,0,0,67,128, 195,128,199,128,199,128,199,128,205,128,205,128,205,128,217,128, 217,128,217,128,209,128,209,128,193,0,9,14,28,10,0,0, 91,128,219,128,215,128,199,128,199,128,205,128,205,128,205,128, 217,128,217,128,217,128,209,128,209,128,193,0,9,14,28,10, 0,0,65,128,195,128,199,0,206,0,220,0,216,0,216,0, 216,0,216,0,220,0,206,0,199,0,195,128,65,128,9,14, 28,10,0,0,220,0,222,0,199,0,195,128,193,128,193,128, 193,128,193,128,193,128,193,128,193,128,193,128,193,128,193,128, 9,14,28,10,0,0,193,128,227,128,247,128,247,128,213,128, 193,128,213,128,221,128,221,128,201,128,193,128,193,128,193,128, 129,0,9,14,28,10,0,0,129,0,193,128,193,128,193,128, 193,128,193,128,223,128,223,128,193,128,193,128,193,128,193,128, 193,128,64,128,9,14,28,10,0,0,46,0,111,0,227,128, 193,128,193,128,193,128,193,128,193,128,193,128,193,128,193,128, 227,128,123,0,58,0,9,14,28,10,0,0,223,128,223,128, 193,128,193,128,193,128,193,128,193,128,193,128,193,128,193,128, 193,128,193,128,193,128,129,0,9,14,28,10,0,0,254,0, 255,0,195,128,193,128,193,128,195,128,223,0,222,0,192,0, 192,0,192,0,192,0,192,0,128,0,9,14,28,10,0,0, 14,0,63,0,115,128,97,128,192,0,192,0,192,0,192,0, 192,0,192,0,96,0,112,0,63,128,15,0,9,14,28,10, 0,0,255,0,127,128,0,0,12,0,12,0,12,0,12,0, 12,0,12,0,12,0,12,0,12,0,12,0,4,0,9,14, 28,10,0,0,129,0,193,128,193,128,193,128,193,128,125,128, 61,128,1,128,1,128,1,128,193,128,225,128,127,0,62,0, 10,14,28,11,0,0,63,0,127,128,237,192,204,192,204,192, 237,192,109,128,45,0,12,0,12,0,12,0,12,0,12,0, 4,0,9,14,28,10,0,0,193,128,193,128,193,128,99,0, 99,0,50,0,56,0,28,0,14,0,103,0,99,0,193,128, 193,128,193,128,10,15,30,10,0,255,130,0,195,0,195,0, 195,0,195,0,195,0,195,0,195,0,195,0,195,0,195,0, 195,0,223,0,223,128,1,192,9,14,28,10,0,0,129,0, 193,128,193,128,193,128,193,128,193,128,225,128,125,128,61,128, 1,128,1,128,1,128,1,128,0,128,10,14,28,11,0,0, 128,128,192,192,192,192,192,192,200,192,204,192,204,192,204,192, 204,192,204,192,196,192,192,64,223,128,95,192,11,15,30,11, 0,255,128,128,192,192,192,192,192,192,200,192,204,192,204,192, 204,192,204,192,204,192,196,192,192,64,223,128,95,192,0,224, 9,14,28,10,0,0,224,0,224,0,96,0,96,0,96,0, 96,0,110,0,111,0,99,128,97,128,97,128,99,128,127,0, 62,0,10,14,28,11,0,0,128,128,192,192,192,192,192,192, 192,192,192,192,220,192,222,192,199,64,195,64,195,64,199,64, 254,192,124,192,9,14,28,10,0,0,128,0,192,0,192,0, 192,0,192,0,192,0,222,0,223,0,195,128,193,128,193,128, 195,128,255,0,254,0,9,14,28,10,0,0,62,0,127,0, 227,128,193,128,193,128,1,128,29,128,29,128,1,128,1,128, 193,128,227,128,127,0,62,0,10,14,28,11,0,0,71,0, 207,128,221,192,216,192,216,192,216,192,248,192,248,192,216,192, 216,192,216,192,221,192,207,128,135,0,9,14,28,10,0,0, 63,128,127,128,225,128,193,128,193,128,225,128,125,128,61,128, 29,128,57,128,113,128,225,128,193,128,129,0,8,11,11,9, 0,0,124,127,3,3,59,123,227,195,199,255,123,8,11,11, 9,0,0,7,31,56,112,102,207,195,195,231,126,60,8,11, 11,9,0,0,92,222,198,198,220,222,195,195,199,222,188,8, 11,11,9,0,0,254,255,192,192,192,192,192,192,192,192,128, 10,11,22,11,0,0,31,128,31,128,25,128,49,128,49,128, 49,128,1,128,127,192,255,192,192,192,192,192,8,11,11,9, 0,0,60,126,231,195,195,223,222,192,227,127,62,9,11,22, 10,0,0,64,128,201,128,201,128,107,0,54,0,54,0,107, 0,201,128,201,128,201,128,129,0,8,11,11,9,0,0,116, 246,195,7,126,62,6,3,7,254,124,8,11,11,9,0,0, 65,195,195,199,207,223,219,211,195,195,130,8,11,11,9,0, 0,89,219,211,199,207,223,219,211,195,195,130,8,11,11,9, 0,0,71,207,204,220,216,216,216,220,206,199,67,8,11,11, 9,0,0,27,59,115,227,195,195,195,195,195,195,195,9,11, 22,10,0,0,65,0,227,128,247,128,247,128,213,128,213,128, 213,128,213,128,193,128,193,128,129,0,8,11,11,9,0,0, 65,195,195,251,251,195,195,195,195,195,130,8,11,11,9,0, 0,52,118,227,195,195,195,195,195,227,118,52,8,11,11,9, 0,0,95,223,195,195,195,195,195,195,195,195,130,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255};
- Войдите на сайт для отправки комментариев
Пнд, 29/05/2017 — 10:09
#47
DAFdriver
Offline
Зарегистрирован: 12.08.2016
Так он там есть , может не правильный . пост 29 .
- Войдите на сайт для отправки комментариев
Пнд, 29/05/2017 — 10:12
#48
ua6em
Онлайн
Зарегистрирован: 17.08.2016
DAFdriver пишет:
Так он там есть , может не правильный . пост 29 .
не в скетче, а в отдельном файле, точно есть? и имя файла соответствует? сомневаюсь )))
- Войдите на сайт для отправки комментариев
Пнд, 29/05/2017 — 11:39
#49
DAFdriver
Offline
Зарегистрирован: 12.08.2016
Да в отдельной папке . В ide на белом фоне DDS_sveper1_TFT_ST7735_128X160_V4hvspi рядом на синем фоне rusFont.h и далее
/***************************************************************************
* Name : DDS_Sweeper.BAS *
* Author : Beric Dunn (K6BEZ) *
* Notice : Copyright (c) 2013 CC-BY-SA *
* : Creative Commons Attribution-ShareAlike 3.0 Unported License *
* Date : 9/26/2013 *
* Version : 1.0 *
* Notes : Written using for the Arduino Micro *
* : Pins: *
* : A0 — Reverse Detector Analog in *
* : A1 — Forward Detector Analog in *
* : Modified by Norbert Redeker (DG7EAO) 07/2014 *
* : TFT Display mit ILI9341 Chip, SPI, 240 x 320 *
***************************************************************************/
#include <SPI.h>
#include «Ucglib.h»
#include «rusFont.h»
// Define Pins used to control AD9850 DDS
const int FQ_UD=9;
const int SDAT=7;
const int SCLK=10;
const int RESET=12;
// Variablen für Display
double vswrArray[110]; //Array für SWR
int z = 0; // Index für Array
double SwrFreq = 14; // Variable für Freq. mit SWR Min.
double SwrMin = 100; // Variable für SWR Min.
double Freq1 = 1; // Freq. Links unterste Zeile Display
double Freq2 = 15; // Freq. Mitte unterste Zeile Display
double Freq3 = 30; // Freq. Mitte unterste Zeile Display
unsigned long milliold = 0; //Millisekunden für Entprellung Interrupt
unsigned long millinew = 0; //Millisekunden für Entprellung Interrupt
int flag = 0; // wir auf 1 gesetzt bei Interrupt, in void Loop perform_sweep
double counter = 0; // Zähler um erste Interrupts zu ignorieren
// Variablen für Messung
double Fstart_MHz = 1; // Start Frequency for sweep
double Fstop_MHz = 30; // Stop Frequency for sweep
double current_freq_MHz; // Temp variable used during sweep
long serial_input_number; // Used to build number from serial stream
int num_steps = 100; // Number of steps to use in the sweep
char incoming_char; // Character read from serial stream
//Konstruktor für Display
Ucglib_ST7735_18x128x160_HWSPI ucg(/*cd=*/ 6 , /*cs=*/ 5, /*reset=*/ 4);
// the setup routine runs once when you press reset:
void setup() {
// Voltmetr
analogReference(INTERNAL);
float Vbat = (analogRead(A5) * 1.1) / 1023.0;
float Vin = Vbat / (89.8 / (783.0 + 89.8)); // R2/(R1+R2)
// Schreibe Info Text auf Display
ucg.begin(UCG_FONT_MODE_SOLID);
ucg.clearScreen();
ucg.setRotate90();
ucg.setFont(my14x10rus);
ucg.setColor(255, 255, 255);
ucg.setPrintPos(32,25);
ucg.print(«Панорамный»);
ucg.setPrintPos(40,45);
ucg.print(«КСВ Метр»);
ucg.setPrintPos(40,65);
ucg.print(«1-30 MHz»);
ucg.setPrintPos(32,90);
ucg.print(«Пенза 2016»);
ucg.setPrintPos(5,128);
ucg.print(«Бат «);
ucg.setPrintPos(40,128);
ucg.print(Vin, 1);
// Configiure DDS control pins for digital output
pinMode(FQ_UD,OUTPUT);
pinMode(SCLK,OUTPUT);
pinMode(SDAT,OUTPUT);
pinMode(RESET,OUTPUT);
//Tasten Interrupt an PIN 2
pinMode(2,OUTPUT);
digitalWrite(2, HIGH);
attachInterrupt(0, key2, FALLING);
unsigned long milliold = millis();
//Tasten Interrupt an PIN 3
pinMode(3,OUTPUT);
digitalWrite(3, HIGH);
attachInterrupt(1, key3, FALLING);
//milliold = millis();
// Configure LED pin for digital output
pinMode(13,OUTPUT);
// Set up analog inputs on A0 and A1, internal reference voltage
pinMode(A0,INPUT);
pinMode(A1,INPUT);
analogReference(INTERNAL);
// initialize serial communication at 57600 baud
Serial.begin(57600);
// Reset the DDS
digitalWrite(RESET,HIGH);
digitalWrite(RESET,LOW);
//Initialise the incoming serial number to zero
serial_input_number=0;
}
// the loop routine runs over and over again forever:
void loop() {
//Check for character
if(Serial.available()>0){
incoming_char = Serial.read();
switch(incoming_char){
case ‘0’:
case ‘1’:
case ‘2’:
case ‘3’:
case ‘4’:
case ‘5’:
case ‘6’:
case ‘7’:
case ‘8’:
case ‘9’:
serial_input_number=serial_input_number*10+(incoming_char-‘0’);
break;
case ‘A’:
//Turn frequency into FStart
Fstart_MHz = ((double)serial_input_number)/1000000;
serial_input_number=0;
break;
case ‘B’:
//Turn frequency into FStop
Fstop_MHz = ((double)serial_input_number)/1000000;
serial_input_number=0;
break;
case ‘C’:
//Turn frequency into FStart and set DDS output to single frequency
Fstart_MHz = ((double)serial_input_number)/1000000;
//SetDDSFreq(Fstart_MHz);
SetDDSFreq(Fstart_MHz * 1000000);
delay(100);
SetDDSFreq(Fstart_MHz * 1000000);
serial_input_number=0;
break;
case ‘N’:
// Set number of steps in the sweep
num_steps = serial_input_number;
serial_input_number=0;
break;
case ‘S’:
case ‘s’:
Perform_sweep();
break;
case ‘?’:
// Report current configuration to PC
Serial.print(«Start Freq:»);
Serial.println(Fstart_MHz*1000000);
Serial.print(«Stop Freq:»);
Serial.println(Fstop_MHz*1000000);
Serial.print(«Num Steps:»);
Serial.println(num_steps);
break;
}
Serial.flush();
}
//Perform Sweep nach Interrupt PIN2 oder 3
// ingnoriere Startup Interrupts durch counter
if (flag == 1 && counter >2)
{
flag = 0;
Perform_sweep();
}
}
void Perform_sweep(){
double FWD=0;
double REV=0;
double VSWR;
double Fstep_MHz = (Fstop_MHz-Fstart_MHz)/num_steps;
z = 0;
SwrMin = 100;
ucg.clearScreen();
ucg.setFont(my14x10rus);
ucg.setColor(255, 0, 100);
ucg.setPrintPos(35,60);
ucg.print(«Анализ КСВ»);
// Start loop
for(int i=0;i<=num_steps;i++){
// Calculate current frequency
current_freq_MHz = Fstart_MHz + i*Fstep_MHz;
// Set DDS to current frequency
SetDDSFreq(current_freq_MHz*1000000);
// Wait a little for settling
//delay(10);
delay(100);
// Read the forward and reverse voltages
REV = analogRead(A0);
FWD = analogRead(A1);
//Offset Korrektur
REV = REV-5;
if(REV>=FWD){
REV = FWD-1;
}
if (REV <1) {
REV = 1;
}
VSWR = (FWD+REV)/(FWD-REV);
//Skalieren für Ausgabe
VSWR = VSWR * 1000;
// Send current line back to PC over serial bus
Serial.print(current_freq_MHz*1000000);
Serial.print(«,0,»);
Serial.print(VSWR);
Serial.print(«,»);
Serial.print(FWD);
Serial.print(«,»);
Serial.println(REV);
// Übergebe SWR an Array
// ERmittele Freq bei niedrigsten SWR
vswrArray[z] = VSWR/1000;
if (vswrArray[z] > 10) vswrArray[z] = 10;
if (vswrArray[z] < SwrMin && vswrArray[z] > 1)
{
SwrMin = vswrArray[z];
SwrFreq = current_freq_MHz;
}
z = z + 1;
}
// Send «End» to PC to indicate end of sweep
Serial.println(«End»);
Serial.flush();
ucg.clearScreen();
//Zeichne Grid
CreateGrid();
ucg.setColor(76, 255, 0);
// Draw Line
double last = 10;
double xx = 6;
double j = 1;
for (int i = 1 ;i < 103; i++){
xx = vswrArray[i];
ucg.drawLine(j,105-last*9, j+1, 105-xx*9);
ucg.drawLine(j+1,105-last*9, j+2, 105-xx*9);
j = j + 1.5;
last = xx;
}
}
// Setze DDS Frequenz
void SetDDSFreq(double Freq_Hz){
// Calculate the DDS word — from AD9850 Datasheet
int32_t f = Freq_Hz * 4294967295/125000000;
// Send one byte at a time
for (int b=0;b<4;b++,f>>=8){
send_byte(f & 0xFF);
}
// 5th byte needs to be zeros
send_byte(0);
// Strobe the Update pin to tell DDS to use values
digitalWrite(FQ_UD,HIGH);
digitalWrite(FQ_UD,LOW);
}
// Sende Daten an DDS
void send_byte(byte data_to_send){
// Bit bang the byte over the SPI bus
for (int i=0; i<8; i++,data_to_send>>=1){
// Set Data bit on output pin
digitalWrite(SDAT,data_to_send & 0x01);
// Strobe the clock pin
digitalWrite(SCLK,HIGH);
digitalWrite(SCLK,LOW);
}
}
//Zeichne Grid auf TFT Display
void CreateGrid()
{
//ucg.clearScreen();
double maxSwr = 10;
ucg.setFont(ucg_font_5x8);
ucg.drawHLine(0,60,155);
ucg.drawHLine(0,98,155);
ucg.drawVLine(39,15,90);
ucg.drawVLine(78,15,90);
ucg.drawVLine(117,15,90);
ucg.setPrintPos(0, 118);
ucg.print(Freq1,3);
ucg.setPrintPos(65, 118);
ucg.print(Freq2,3);
ucg.setPrintPos(130, 118);
ucg.print(Freq3,3);
ucg.setPrintPos(5, 8);
ucg.print(«SWR»);
ucg.setPrintPos(30, 8);
ucg.print(SwrMin,2);
ucg.setPrintPos(58, 8);
ucg.print(«>»);
ucg.setPrintPos(65, 8);
ucg.print(maxSwr,2);
ucg.setPrintPos(125, 8);
ucg.print(SwrFreq,3);
ucg.drawRFrame(0,15,155,90, 1);
}
// Interrupt Service Routine
// Abfrage Low an Pin 2
void key2()
{
//ignoriere Startup Interrupts > counter
counter = counter + 1;
//Entprellen mit millis()
millinew = millis();
if (millinew — milliold < 1000)
{
milliold = millinew;
return;
}
milliold = millinew;
Fstart_MHz = 1; // Start Frequency for sweep
Fstop_MHz = 30; // Stop Frequency for sweep
num_steps = 102; // Steps
Freq1 = 1; // Unterste Zeile Display Freq. Links
Freq2 = 15; // Unterste Zeile Display Freq. Mitte
Freq3 = 30; // Unterste Zeile Display Freq. Recht
//Perform_sweep();
flag = 1;
}
// Interrupt Service Routine
// Abfrage Low an Pin 3
void key3()
{
//ignoriere Startup Interrupts > counter
counter = counter + 1;
//Entprellen mit millis()
millinew = millis();
if (millinew — milliold < 1000)
{
milliold = millinew;
return;
}
milliold = millinew;
int x = SwrFreq + 0.5; //Runde auf Mhz
Fstart_MHz = x-1; // Start Frequency for sweep
Fstop_MHz = x+1; // Stop Frequency for sweep
num_steps = 102; // Steps
Freq1 = x-1; // Unterste Zeile Display Freq. Links
Freq2 = x; // Unterste Zeile Display Freq. Mitte
Freq3 = x+1; // Unterste Zeile Display Freq. Rechts
//Perform_sweep();
flag = 1;
}
кликаем rusFont.h открывается
const ucg_fntpgm_uint8_t my14x10rus[4157] UCG_SECTION(«.progmem.my14x10») = {
0,11,15,0,255,14,3,35,6,248,32,255,0,15,255,14,
0,0,0,0,8,0,0,2,14,14,4,1,0,64,192,192,
192,192,192,192,192,192,128,0,64,192,128,6,5,5,7,0,
9,68,204,204,204,136,10,14,28,11,0,0,8,128,8,128,
17,0,17,0,127,192,17,0,17,0,34,0,34,0,255,128,
34,0,34,0,68,0,68,0,9,14,28,10,0,0,8,0,
8,0,59,128,123,0,200,0,200,0,232,0,107,0,11,128,
9,128,9,128,111,0,238,0,8,0,8,14,14,9,0,0,
97,179,214,102,12,12,24,24,48,48,102,107,205,134,9,14,
28,10,0,0,56,0,124,0,108,0,108,0,108,0,56,0,
56,128,109,128,199,0,194,0,199,0,237,128,124,128,56,0,
2,5,5,3,0,10,128,192,192,192,64,5,14,14,6,0,
0,24,48,96,96,192,192,192,192,192,192,96,96,48,24,5,
14,14,6,0,0,192,96,48,48,24,24,24,24,24,24,56,
48,96,192,7,7,7,8,0,4,146,214,124,16,124,214,146,
8,10,10,10,0,1,8,24,24,24,127,254,24,24,24,16,
4,6,6,5,0,0,112,96,96,64,192,192,8,2,2,9,
0,5,127,254,3,3,3,4,0,0,224,160,224,8,14,14,
9,0,0,3,3,6,6,12,12,24,24,48,48,96,96,192,
192,9,14,28,10,0,0,62,0,127,0,227,128,197,128,197,
128,197,128,201,128,201,128,209,128,209,128,209,128,227,128,127,
0,62,0,9,14,28,10,0,0,12,0,28,0,60,0,124,
0,8,0,4,0,12,0,12,0,8,0,4,0,12,0,12,
0,127,128,255,128,9,14,28,10,0,0,126,0,255,0,195,
128,193,128,1,128,3,128,63,0,126,0,224,0,192,0,192,
0,192,0,223,128,191,0,9,14,28,10,0,0,126,0,255,
0,195,128,1,128,1,128,3,0,58,0,119,0,3,128,1,
128,1,128,3,128,255,0,126,0,9,14,28,10,0,0,2,
0,6,0,14,0,30,0,62,0,118,0,230,0,198,0,251,
128,247,0,6,0,6,0,6,0,4,0,9,14,28,10,0,
0,127,128,127,128,96,0,96,0,96,0,110,0,111,0,3,
128,1,128,1,128,1,128,195,0,255,0,124,0,9,14,28,
10,0,0,31,0,127,0,96,0,192,0,192,0,192,0,222,
0,223,0,195,128,193,128,193,128,227,0,127,0,60,0,9,
14,28,10,0,0,127,128,255,128,0,0,3,0,3,0,6,
0,6,0,12,0,12,0,24,0,24,0,48,0,48,0,32,
0,9,14,28,10,0,0,58,0,119,0,227,128,193,128,193,
128,99,0,54,0,111,0,227,128,193,128,193,128,227,128,119,
0,46,0,9,14,28,10,0,0,60,0,255,0,231,0,195,
128,193,128,193,128,225,128,253,128,125,128,1,128,3,128,7,
0,127,0,252,0,3,11,11,4,0,2,224,160,224,0,0,
0,0,0,224,160,224,4,13,13,5,0,0,112,80,112,0,
0,0,0,0,112,80,112,96,192,9,11,22,10,0,1,1,
128,3,128,15,0,28,0,120,0,224,0,120,0,28,0,15,
0,3,128,1,128,9,6,12,10,0,4,127,128,255,0,0,
0,0,0,127,128,255,0,9,11,22,10,0,1,192,0,224,
0,120,0,60,0,15,0,3,128,15,0,60,0,120,0,224,
0,192,0,8,14,14,9,0,0,116,238,135,3,3,6,14,
56,48,48,0,0,48,48,9,11,22,10,0,1,62,0,65,
0,128,128,154,128,166,128,162,128,162,128,166,128,155,0,64,
0,63,128,9,14,28,10,0,0,252,0,254,0,199,0,195,
128,193,128,193,128,193,128,253,128,253,128,193,128,193,128,193,
128,193,128,129,0,9,14,28,10,0,0,94,0,223,0,195,
128,193,128,193,128,195,128,255,0,255,0,195,128,193,128,193,
128,195,128,223,0,190,0,9,14,28,10,0,0,14,0,63,
0,115,128,97,128,192,0,192,0,192,0,192,0,192,0,192,
0,96,0,112,0,63,128,15,0,9,14,28,10,0,0,238,
0,111,0,99,128,97,128,97,128,97,128,97,128,97,128,97,
128,97,128,97,128,99,128,111,0,238,0,9,14,28,10,0,
0,95,128,223,0,192,0,192,0,192,0,192,0,223,0,222,
0,192,0,192,0,192,0,192,0,223,128,191,0,9,14,28,
10,0,0,95,128,223,0,192,0,192,0,192,0,192,0,223,
0,222,0,192,0,192,0,192,0,192,0,192,0,128,0,9,
14,28,10,0,0,63,128,127,128,225,128,192,0,192,0,192,
0,192,0,207,128,223,128,193,128,193,128,225,128,127,128,62,
0,9,14,28,10,0,0,129,0,193,128,193,128,193,128,193,
128,193,128,223,128,223,128,193,128,193,128,193,128,193,128,193,
128,64,128,8,14,14,10,1,0,254,127,24,24,24,24,24,
24,24,24,24,24,254,127,9,14,28,10,0,0,31,128,63,
128,1,128,1,128,1,128,1,128,1,128,1,128,1,128,1,
128,1,128,195,128,255,0,62,0,9,14,28,10,0,0,65,
128,195,128,199,0,206,0,220,0,216,0,216,0,216,0,216,
0,220,0,206,0,199,0,195,128,65,128,9,14,28,10,0,
0,64,0,192,0,192,0,192,0,192,0,192,0,192,0,192,
0,192,0,192,0,192,0,192,0,255,128,255,0,9,14,28,
10,0,0,193,128,227,128,247,128,247,128,213,128,193,128,213,
128,221,128,221,128,201,128,193,128,193,128,193,128,129,0,9,
14,28,10,0,0,225,0,225,128,241,128,241,128,249,128,217,
128,221,128,205,128,205,128,197,128,197,128,193,128,193,128,128,
128,9,14,28,10,0,0,46,0,111,0,227,128,193,128,193,
128,193,128,193,128,193,128,193,128,193,128,193,128,227,128,123,
0,58,0,9,14,28,10,0,0,254,0,255,0,195,128,193,
128,193,128,195,128,223,0,222,0,192,0,192,0,192,0,192,
0,192,0,128,0,10,15,30,10,0,255,46,0,111,0,227,
128,193,128,193,128,193,128,193,128,193,128,193,128,193,128,193,
128,227,0,123,128,58,192,0,192,9,14,28,10,0,0,126,
0,255,0,195,128,193,128,193,128,195,128,223,0,220,0,206,
0,199,0,195,128,193,128,193,128,129,0,9,14,28,10,0,
0,62,0,127,0,224,0,192,0,192,0,224,0,118,0,27,
0,3,128,1,128,1,128,3,128,255,128,127,0,9,14,28,
10,0,0,255,0,127,128,0,0,12,0,12,0,12,0,12,
0,12,0,12,0,12,0,12,0,12,0,12,0,4,0,9,
14,28,10,0,0,64,128,193,128,193,128,193,128,193,128,193,
128,193,128,193,128,193,128,193,128,193,128,99,0,127,0,62,
0,9,14,28,10,0,0,227,128,99,0,99,0,99,0,34,
0,54,0,54,0,54,0,20,0,28,0,28,0,28,0,8,
0,8,0,10,14,28,11,0,0,64,64,192,192,192,192,192,
192,192,192,192,192,204,192,204,192,204,192,222,192,222,192,211,
192,193,192,128,192,9,14,28,10,0,0,193,128,193,128,193,
128,99,0,99,0,50,0,56,0,28,0,14,0,103,0,99,
0,193,128,193,128,193,128,10,14,28,10,0,0,192,192,192,
192,97,128,97,128,51,0,63,0,30,0,12,0,8,0,4,
0,12,0,12,0,12,0,8,0,9,14,28,10,0,0,127,
128,255,128,1,128,3,128,7,0,6,0,4,0,16,0,48,
0,112,0,224,0,192,0,255,128,255,0,5,14,14,6,0,
0,248,192,192,192,192,192,192,192,192,192,192,192,192,248,9,
14,28,10,0,0,192,0,96,0,96,0,48,0,48,0,24,
0,24,0,12,0,12,0,6,0,6,0,3,0,3,0,1,
128,5,14,14,6,0,0,248,24,24,24,24,24,24,24,24,
24,24,24,24,248,9,6,12,10,0,8,8,0,28,0,54,
0,99,0,193,128,128,128,10,1,2,10,0,255,255,192,4,
3,3,5,0,12,224,96,48,8,11,11,9,0,0,124,127,
3,3,59,123,227,195,199,255,123,9,13,26,10,0,0,64,
0,192,0,192,0,192,0,192,0,222,0,223,0,195,128,193,
128,193,128,195,0,255,0,222,0,8,11,11,9,0,0,30,
63,115,224,192,192,192,224,240,127,30,9,13,26,10,0,0,
0,128,1,128,1,128,1,128,1,128,61,128,125,128,225,128,
193,128,193,128,227,128,127,128,61,128,8,11,11,9,0,0,
60,126,231,195,195,223,222,192,227,127,62,7,13,13,8,0,
0,62,124,96,96,252,248,96,96,96,96,96,96,32,8,13,
13,9,0,0,63,127,227,195,195,195,227,123,51,3,3,127,
254,8,13,13,9,0,0,64,192,192,192,222,223,195,195,195,
195,195,195,130,2,13,13,3,0,0,64,192,128,64,192,192,
192,192,192,192,192,192,128,5,14,14,6,0,255,16,24,24,
8,48,120,24,24,24,24,24,24,120,240,8,13,13,9,0,
0,64,192,192,198,198,204,216,216,216,204,198,199,131,2,14,
14,3,0,0,64,192,192,192,192,192,192,192,192,192,192,192,
192,128,9,11,22,10,0,0,91,0,219,128,201,128,201,128,
201,128,201,128,201,128,201,128,201,128,193,128,129,0,8,11,
11,9,0,0,94,223,195,195,195,195,195,195,195,195,130,8,
11,11,9,0,0,52,118,227,195,195,195,195,195,227,118,52,
8,11,11,9,0,0,252,254,199,195,199,222,220,192,192,192,
128,9,13,26,9,0,255,63,0,127,0,227,0,195,0,195,
0,195,0,251,0,123,0,3,0,3,0,3,128,3,128,3,
128,7,11,11,8,0,0,92,222,224,224,192,192,192,192,192,
192,128,8,11,11,9,0,0,62,127,192,192,240,102,15,3,
3,254,124,6,13,13,7,0,0,32,96,96,252,248,96,96,
96,96,96,96,124,60,8,11,11,9,0,0,65,195,195,195,
195,195,195,195,227,123,58,8,11,11,9,0,0,129,129,195,
195,102,102,102,36,60,24,24,9,11,22,10,0,0,128,128,
193,128,201,128,201,128,201,128,201,128,193,128,221,128,247,128,
227,128,65,0,8,11,11,9,0,0,195,102,102,52,24,24,
24,52,102,102,195,8,12,12,9,0,255,193,227,99,102,110,
44,12,24,24,48,240,224,8,11,11,9,0,0,127,255,7,
6,12,0,48,96,224,255,254,7,14,14,8,0,0,14,28,
24,24,24,48,224,224,48,24,24,24,28,14,2,16,16,5,
1,255,192,192,192,192,192,192,192,192,192,192,192,192,192,192,
192,192,8,14,14,9,0,0,224,112,24,24,24,12,7,7,
12,24,24,24,112,224,10,5,10,11,0,4,48,192,120,192,
204,192,199,128,195,0,5,13,13,6,0,1,248,136,136,136,
136,136,136,136,136,136,136,136,248,8,11,11,9,0,0,252,
254,199,195,199,222,220,192,192,192,128,8,11,11,9,0,0,
30,63,115,224,192,192,192,224,240,127,30,8,11,11,9,0,
0,127,254,24,24,24,24,24,24,24,24,16,8,12,12,9,
0,255,193,227,99,102,110,44,12,24,24,48,240,224,8,12,
12,9,0,255,126,255,219,219,219,219,90,24,24,24,24,16,
8,11,11,9,0,0,195,102,102,52,24,24,24,52,102,102,
195,8,12,12,9,0,255,132,198,198,198,198,198,198,198,198,
254,255,3,8,11,11,9,0,0,65,195,195,195,231,127,63,
3,3,3,2,8,11,11,9,0,0,130,195,195,211,219,219,
219,219,219,203,255,8,12,12,9,0,255,130,195,195,211,219,
219,219,219,218,200,255,3,8,11,11,9,0,0,192,224,96,
96,108,110,103,99,103,126,124,8,11,11,9,0,0,130,195,
195,195,219,221,207,199,207,253,251,8,11,11,9,0,0,64,
192,192,192,220,222,199,195,199,254,252,8,11,11,9,0,0,
124,254,198,3,27,59,3,3,6,254,120,9,11,22,10,0,
0,71,0,207,128,205,128,205,128,221,128,221,128,205,128,205,
128,205,128,207,128,135,0,8,11,11,9,0,0,63,127,227,
195,227,123,59,51,51,115,226,9,14,28,10,0,0,252,0,
254,0,199,0,195,128,193,128,193,128,193,128,253,128,253,128,
193,128,193,128,193,128,193,128,129,0,9,14,28,10,0,0,
223,128,223,0,192,0,192,0,192,0,192,0,222,0,223,0,
195,128,193,128,193,128,195,128,255,0,254,0,9,14,28,10,
0,0,94,0,223,0,195,128,193,128,193,128,195,128,255,0,
255,0,195,128,193,128,193,128,195,128,223,0,190,0,9,14,
28,10,0,0,223,0,223,128,192,0,192,0,192,0,192,0,
192,0,192,0,192,0,192,0,192,0,192,0,192,0,128,0,
9,14,28,10,0,0,11,0,27,0,59,0,115,0,99,0,
99,0,99,0,99,0,99,0,99,0,123,0,251,128,193,128,
193,128,9,14,28,10,0,0,95,128,223,0,192,0,192,0,
192,0,192,0,223,0,222,0,192,0,192,0,192,0,192,0,
223,128,191,0,10,14,28,11,0,0,64,64,192,192,196,192,
204,192,204,192,109,128,109,128,109,128,109,128,204,192,204,192,
204,192,200,192,128,128,9,14,28,10,0,0,122,0,251,0,
131,128,1,128,1,128,3,0,58,0,123,0,3,128,1,128,
1,128,131,128,251,0,120,0,9,14,28,10,0,0,67,128,
195,128,199,128,199,128,199,128,205,128,205,128,205,128,217,128,
217,128,217,128,209,128,209,128,193,0,9,14,28,10,0,0,
91,128,219,128,215,128,199,128,199,128,205,128,205,128,205,128,
217,128,217,128,217,128,209,128,209,128,193,0,9,14,28,10,
0,0,65,128,195,128,199,0,206,0,220,0,216,0,216,0,
216,0,216,0,220,0,206,0,199,0,195,128,65,128,9,14,
28,10,0,0,220,0,222,0,199,0,195,128,193,128,193,128,
193,128,193,128,193,128,193,128,193,128,193,128,193,128,193,128,
9,14,28,10,0,0,193,128,227,128,247,128,247,128,213,128,
193,128,213,128,221,128,221,128,201,128,193,128,193,128,193,128,
129,0,9,14,28,10,0,0,129,0,193,128,193,128,193,128,
193,128,193,128,223,128,223,128,193,128,193,128,193,128,193,128,
193,128,64,128,9,14,28,10,0,0,46,0,111,0,227,128,
193,128,193,128,193,128,193,128,193,128,193,128,193,128,193,128,
227,128,123,0,58,0,9,14,28,10,0,0,223,128,223,128,
193,128,193,128,193,128,193,128,193,128,193,128,193,128,193,128,
193,128,193,128,193,128,129,0,9,14,28,10,0,0,254,0,
255,0,195,128,193,128,193,128,195,128,223,0,222,0,192,0,
192,0,192,0,192,0,192,0,128,0,9,14,28,10,0,0,
14,0,63,0,115,128,97,128,192,0,192,0,192,0,192,0,
192,0,192,0,96,0,112,0,63,128,15,0,9,14,28,10,
0,0,255,0,127,128,0,0,12,0,12,0,12,0,12,0,
12,0,12,0,12,0,12,0,12,0,12,0,4,0,9,14,
28,10,0,0,129,0,193,128,193,128,193,128,193,128,125,128,
61,128,1,128,1,128,1,128,193,128,225,128,127,0,62,0,
10,14,28,11,0,0,63,0,127,128,237,192,204,192,204,192,
237,192,109,128,45,0,12,0,12,0,12,0,12,0,12,0,
4,0,9,14,28,10,0,0,193,128,193,128,193,128,99,0,
99,0,50,0,56,0,28,0,14,0,103,0,99,0,193,128,
193,128,193,128,10,15,30,10,0,255,130,0,195,0,195,0,
195,0,195,0,195,0,195,0,195,0,195,0,195,0,195,0,
195,0,223,0,223,128,1,192,9,14,28,10,0,0,129,0,
193,128,193,128,193,128,193,128,193,128,225,128,125,128,61,128,
1,128,1,128,1,128,1,128,0,128,10,14,28,11,0,0,
128,128,192,192,192,192,192,192,200,192,204,192,204,192,204,192,
204,192,204,192,196,192,192,64,223,128,95,192,11,15,30,11,
0,255,128,128,192,192,192,192,192,192,200,192,204,192,204,192,
204,192,204,192,204,192,196,192,192,64,223,128,95,192,0,224,
9,14,28,10,0,0,224,0,224,0,96,0,96,0,96,0,
96,0,110,0,111,0,99,128,97,128,97,128,99,128,127,0,
62,0,10,14,28,11,0,0,128,128,192,192,192,192,192,192,
192,192,192,192,220,192,222,192,199,64,195,64,195,64,199,64,
254,192,124,192,9,14,28,10,0,0,128,0,192,0,192,0,
192,0,192,0,192,0,222,0,223,0,195,128,193,128,193,128,
195,128,255,0,254,0,9,14,28,10,0,0,62,0,127,0,
227,128,193,128,193,128,1,128,29,128,29,128,1,128,1,128,
193,128,227,128,127,0,62,0,10,14,28,11,0,0,71,0,
207,128,221,192,216,192,216,192,216,192,248,192,248,192,216,192,
216,192,216,192,221,192,207,128,135,0,9,14,28,10,0,0,
63,128,127,128,225,128,193,128,193,128,225,128,125,128,61,128,
29,128,57,128,113,128,225,128,193,128,129,0,8,11,11,9,
0,0,124,127,3,3,59,123,227,195,199,255,123,8,11,11,
9,0,0,7,31,56,112,102,207,195,195,231,126,60,8,11,
11,9,0,0,92,222,198,198,220,222,195,195,199,222,188,8,
11,11,9,0,0,254,255,192,192,192,192,192,192,192,192,128,
10,11,22,11,0,0,31,128,31,128,25,128,49,128,49,128,
49,128,1,128,127,192,255,192,192,192,192,192,8,11,11,9,
0,0,60,126,231,195,195,223,222,192,227,127,62,9,11,22,
10,0,0,64,128,201,128,201,128,107,0,54,0,54,0,107,
0,201,128,201,128,201,128,129,0,8,11,11,9,0,0,116,
246,195,7,126,62,6,3,7,254,124,8,11,11,9,0,0,
65,195,195,199,207,223,219,211,195,195,130,8,11,11,9,0,
0,89,219,211,199,207,223,219,211,195,195,130,8,11,11,9,
0,0,71,207,204,220,216,216,216,220,206,199,67,8,11,11,
9,0,0,27,59,115,227,195,195,195,195,195,195,195,9,11,
22,10,0,0,65,0,227,128,247,128,247,128,213,128,213,128,
213,128,213,128,193,128,193,128,129,0,8,11,11,9,0,0,
65,195,195,251,251,195,195,195,195,195,130,8,11,11,9,0,
0,52,118,227,195,195,195,195,195,227,118,52,8,11,11,9,
0,0,95,223,195,195,195,195,195,195,195,195,130,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255};
подключаю Arduino nano нажимаю загузить — стрелочку и выдет
Arduino: 1.8.1 (Windows 7), Плата:»Arduino Nano, ATmega328″
C:Program Files (x86)ArduinolibrariesDDS_sweeper1_TFT_ST7735_128x160_v4_hwspiDDS_sweeper1_TFT_ST7735_128x160_v4_hwspi.ino:18:20: fatal error: Ucglib.h: No such file or directory
#include «Ucglib.h»
^
compilation terminated.
exit status 1
Ошибка компиляции для платы Arduino Nano.
Неверная библиотека найдена в C:Program Files (x86)Arduinolibrariesad9850adafuilt: C:Program Files (x86)Arduinolibrariesad9850adafuilt
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesDDS_sweeper1_TFT_ST7735_128x160: C:Program Files (x86)ArduinolibrariesDDS_sweeper1_TFT_ST7735_128x160
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesLCD_ID_Reader: C:Program Files (x86)ArduinolibrariesLCD_ID_Reader
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesOLED_RUS: C:Program Files (x86)ArduinolibrariesOLED_RUS
Неверная библиотека найдена в C:Program Files (x86)Arduinolibrariessimple_dds_st7735_2: C:Program Files (x86)Arduinolibrariessimple_dds_st7735_2
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesTFT-Shield-Example-Code-master: C:Program Files (x86)ArduinolibrariesTFT-Shield-Example-Code-master
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesTFT_Touch_Shield: C:Program Files (x86)ArduinolibrariesTFT_Touch_Shield
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesTFT_Ucglib: C:Program Files (x86)ArduinolibrariesTFT_Ucglib
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesTSCalibration: C:Program Files (x86)ArduinolibrariesTSCalibration
Неверная библиотека найдена в C:Program Files (x86)Arduinolibrariesucglib-master: C:Program Files (x86)Arduinolibrariesucglib-master
Неверная библиотека найдена в C:Program Files (x86)Arduinolibrariesutf8rus3: C:Program Files (x86)Arduinolibrariesutf8rus3
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesUTFT: C:Program Files (x86)ArduinolibrariesUTFT
Неверная библиотека найдена в C:Program Files (x86)Arduinolibrariesad9850adafuilt: C:Program Files (x86)Arduinolibrariesad9850adafuilt
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesDDS_sweeper1_TFT_ST7735_128x160: C:Program Files (x86)ArduinolibrariesDDS_sweeper1_TFT_ST7735_128x160
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesLCD_ID_Reader: C:Program Files (x86)ArduinolibrariesLCD_ID_Reader
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesOLED_RUS: C:Program Files (x86)ArduinolibrariesOLED_RUS
Неверная библиотека найдена в C:Program Files (x86)Arduinolibrariessimple_dds_st7735_2: C:Program Files (x86)Arduinolibrariessimple_dds_st7735_2
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesTFT-Shield-Example-Code-master: C:Program Files (x86)ArduinolibrariesTFT-Shield-Example-Code-master
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesTFT_Touch_Shield: C:Program Files (x86)ArduinolibrariesTFT_Touch_Shield
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesTFT_Ucglib: C:Program Files (x86)ArduinolibrariesTFT_Ucglib
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesTSCalibration: C:Program Files (x86)ArduinolibrariesTSCalibration
Неверная библиотека найдена в C:Program Files (x86)Arduinolibrariesucglib-master: C:Program Files (x86)Arduinolibrariesucglib-master
Неверная библиотека найдена в C:Program Files (x86)Arduinolibrariesutf8rus3: C:Program Files (x86)Arduinolibrariesutf8rus3
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesUTFT: C:Program Files (x86)ArduinolibrariesUTFT
Этот отчёт будет иметь больше информации с
включенной опцией Файл -> Настройки ->
«Показать подробный вывод во время компиляции»
- Войдите на сайт для отправки комментариев
Пнд, 29/05/2017 — 12:30
#50
T.Rook
Offline
Зарегистрирован: 05.03.2016
DAFdriver, да поправьте уже #include «Ucglib.h» на #include <Ucglib.h> !!!!! Вам же уже несколько раз советовали. Или обеспечьте наличие Ucglib.h Ucglib.cpp в папке Вашего скетча.
И наконец-то научитесь правильно вставлять код в сообщение на форуме. Прочтите «Вставка программного кода в комментарий» (одна из приклееных тем вверху)
- Войдите на сайт для отправки комментариев
- 1
- 2
- 3
- следующая ›
- последняя »
COMPILATION ERROR: ERROR: 2 UNKNOWN: EXIT STATUS 1
collect2.exe: error: ld returned 1 exit status Compilation error: Error: 2 UNKNOWN: exit status 1 I recently got the beta and no matter what I do I had this (yes I restarted my pc) and I even download the latest Git (2.30.1) …
From forum.arduino.cc
PROBLEMS UPLOADING CODE TO ESP32+CAM — ESP32 FORUM
Yes I did it through arduino ide by going to Tools>Board>Board Manager>ESP32 by Espressif v 1.0.2. I clicked «Remove» and rebooted. However, when you asked the question it …
From esp32.com
ARDUINO ERROR: 13 INTERNAL EXIT STATUS 1 — SYNERGYMAXLEARN.COM
06-01. Hope it’s helpful. 9,182. #include <avr/io.h>. Before that, you need to install 3 libraries: NeoPixelBus by Micheal C. Miller V2.5.7 (Manager) NTPClient by Fabrice Weinberg
From synergymaxlearn.com
HELP; COMPILATION ERROR: EXIT STATUS 1 ERROR : ARDUINO
Animals and Pets Anime Art Cars and Motor Vehicles Crafts and DIY Culture, Race, and Ethnicity Ethics and Philosophy Fashion Food and Drink History Hobbies Law Learning and Education …
From reddit.com
UNKNOWN CHILD EXIT STATUS! — FIXEXCEPTION.COM
Raise code # if we exited from a signal, let our exit code reflect that if os.WIFSIGNALED(exit_code): exit_code = -os.WTERMSIG(exit_code) # otherwise just give …
From fixexception.com
SOUND — EXIT STATUS 1 ERROR COMPILING FOR BOARD ARDUINO/GENUINO …
Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: «Arduino/Genuino Uno» Tone.cpp.o (symbol from plugin): In function `timer0_pin_port’: (.text+0x0): multiple …
From arduino.stackexchange.com
ERROR: COMMAND ‘GCC’ FAILED WITH EXIT STATUS 1 | DEBUGAH
2. Update the macport version and make sure it is the latest version. At the command line, enter: Update the macport version and make sure it is the latest version. At the command line, enter:
From debugah.com
EXIT STATUS 1 ERROR COMPILING FOR BOARD ARDUINO, FIX. — YOUTUBE
This is a basic tutorial for arduino beginners, who often face this type of problem while uploading the code.More info — https://www.electronics.com.bd/blog/…
From youtube.com
GCC-4.2 FAILED WITH EXIT STATUS 1? — IDQNA.COM
As of Xcode 4.2, Xcode no longer includes gcc-4.2. Usually, llvm-gcc-4.2 or clang is a suitable substitute, but you might want to get in touch with the project’s maintainers to ask why the …
From idqna.com
AVRDUDE, STK500, BOOTLOADER ISSUES — ARDUINO FORUM
I just installed the IDE Pro 0.0.4 version, installed the GIT file successfully.. the installation went as expected, but when opening the IDE just had this message on …
From forum.arduino.cc
ERROR: LINKING WITH RUST-LLD FAILED: EXIT STATUS: 1 — STACK OVERFLOW
11 1. Try setting is_builtin on your target json file to false. – Aiden4. Oct 22, 2021 at 14:23. Sloved. Remove the is_builtin field from the aarch64-unknown-none.json target spec …
From stackoverflow.com
ERROR COMPILING FOR BOARD GENERIC ESP8266 MODULE. — GITHUB
What i know, work fine ether with 2.3.0 or 2.3-rc-2 You just have to update this folder : AppDataLocalArduino15 packagesesp8266hardwareesp82662.3.0-rc2toolssdk with …
From github.com
«COMPILATION ERROR: ERROR: 2 UNKNOWN: EXIT STATUS 1» …
Compilation error: Error: 2 UNKNOWN: exit status 1. Is this due to the fact I have not resolved the issue that popped up before that led to this link? This notification popped up …
From github.com
HOW TO RESOLVE EXIT STATUS 1 ERROR IN ARDUINO UNO? — STACK …
Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question.Provide details and share your research! But avoid …. Asking for help, clarification, …
From stackoverflow.com
«COMPILATION ERROR: ERROR: 2 UNKNOWN: EXIT STATUS 1» …
collect2.exe: error: ld returned 1 exit status Using library IRremote at version 3.0.3 in folder: C:UsersccblandDocumentsArduinolibrariesIRremote Compilation error: Error: 2 …
From github.com
GCC C++ — COLLECT2.EXE: ERROR: LD RETURNED 1 EXIT STATUS
The Real Housewives of Atlanta The Bachelor Sister Wives 90 Day Fiance Wife Swap The Amazing Race Australia Married at First Sight The Real Housewives of Dallas My 600-lb Life …
From reddit.com
ARDUINO EXIT STATUS 1 — DELFT STACK
DelftStack articles are written by software geeks like you. If you also would like to contribute to DelftStack by writing paid articles, you can check the write for us page.
From delftstack.com
WHAT DOES «COLLECT2: ERROR: LD RETURNED 1 EXIT STATUS» MEAN?
Try including conio.h if you are using TurboC. If you are using GCC,this won’t work even if you include it.Also,use int main() instead of void main() and add a return 0; at the …
From stackoverflow.com
RPC ERROR: CODE = UNKNOWN DESC = EXIT STATUS 1 #427
rpc error: code = Unknown desc = exit status 1 #427. Closed RedWifiTeam opened this issue May 10, 2021 · 1 comment Closed rpc error: code = Unknown desc = exit …
From github.com
MINIKUBE STATUS UNKNOWN, WINDOWS 10, DOCKER — STACK OVERFLOW
Remove unused data: docker system prune. Clear minikube’s local state: minikube delete. Start the cluster: minikube start —driver=<driver_name>. (In your case driver name is …
From stackoverflow.com
COMPILATION ERROR: ERROR: 2 UNKNOWN: PLATFORM NOT INSTALLED
Project Hub. Get inspired by a variety of tutorials, Getting Started guides, showcases and pro tips. Contribute with projects, comment tutorials and ‘Respect’ the ones you like.
From support.arduino.cc
ERROR: 2 UNKNOWN: UPLOADING ERROR: NO UPLOAD PORT PROVIDED
In the example above, the board ‘Arduino Uno’ has been selected. The same board is also plugged into a USB port. However, no port has been selected, which is indicated by the red …
From support.arduino.cc
YUM UPDATE FAILS WITH «ERROR IN PREIN SCRIPTLET IN RPM PACKAGE …
Tags. rhn. This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To …
From access.redhat.com
HOW INSTALL BOARD ARDUINO GENUINO 101 AND FIX ERROR #EXIT STATUS 1 …
About Press Copyright Contact us Creators Advertise Developers Terms Privacy Policy & Safety How YouTube works Test new features Press Copyright Contact us Creators …
From youtube.com
ARDUINO HATA MESAJı, EXIT STATUS 1 — YOUTUBE
exit status 1Error compiling for board Arduino/Genuino Uno.
From youtube.com
ARDUINO, EXIT STATUS 1. CAN’T COMPILE TO ARDUINO UNO
arduino, exit status 1. can’t compile to arduino uno. #include <LedControl.h> void setup () { // put your setup code here, to run once: } void loop () { // put your main code here, to …
From arduino.stackexchange.com
ERROR: 2 UNKNOWN: NO FQBN PROVIDED – ARDUINO HELP CENTER
Error: exit status 1; Compilation error: Missing FQBN (Fully Qualified Board Name) Errors when uploading a sketch; Compilation error: Error: 2 UNKNOWN: platform not installed ‘Error: …
From support.arduino.cc
COMPILATION ERROR: ERROR: 2 UNKNOWN: EXIT STATUS 1 : …
1 / 2. It tells the temperature inside my apartment and displays it on an OLED. 646. 37 comments. 527. Posted by 7 days ago. Pressure sensitive fabric for wearable applications. Can be …
From reddit.com
EXIT AND EXIT STATUS
1 #!/bin/bash 2 3 echo hello 4 echo $? # Exit status 0 returned because command executed successfully. 5 6 lskdf # Unrecognized command. 7 echo $? # Non-zero exit status returned …
From cs.auckland.ac.nz
PROBLEMS UPLOADING — INSTALL/UPLOAD PROBLEMS — XOD COMMUNITY
Command Process exited with code 1 Make sure the board is connected, the cable is working, the board model set correctly, the upload port belongs to the board, the board …
From forum.xod.io
EXIT STATUS — WHY DOES A FAILED CAT RETURN 1, BUT OTHER FAILS RETURN 2 …
Any other value of the exit status (by contrast) is a failure. That is all that can be said and all the meaning the exit status could have. There is no connection between the exit …
From unix.stackexchange.com
EXIT STATUS — LS ERROR CODE 2 — UNIX & LINUX STACK EXCHANGE
You will find many cases where the return code is 2, and some are easy to trigger, as shown below. First you can read in it: 802 /* Exit statuses. */ 803 enum 804 { 805 /* «ls» had …
From unix.stackexchange.com
ARDUINO ERROR: 13 INTERNAL EXIT STATUS 1 — RAPIDWEB-NZ.DEV
trauma medical training near me; how to withdraw ethereum meta on trust wallet; thyroid hypoglycemia symptoms. wears well crossword clue; anchorage homeless services
From rapidweb-nz.dev
ERROR: EXIT STATUS 1 – ARDUINO HELP CENTER
If it only reads exit status 1, or if you are unsure, you can check where the process fails by clicking the Verify button. This compiles the sketch without trying to upload it to the board. If …
From support.arduino.cc
UNKNOWN PROCESS EXIT STATUS %R — FIXEXCEPTION.COM
raise ValueError(«unknown process exit status %r» % status) def disk_usage(path): «»»Return disk usage associated with path. Note: UNIX usually reserves 5% disk space which is not …
From fixexception.com
COMPILE ERROR · ISSUE #256 · ARDUINO/ARDUINO-PRO-IDE · GITHUB
I am getting error while compiling the program the error is as reported here: "Error: Request compile failed with message: 2 UNKNOWN: exit status 1 " …
From github.com
UNKNOWN CHILD EXIT STATUS! — FIXEXCEPTION.COM
Today, 6th March 2022, Russia continues bombing and firing Ukraine. Don’t trust Russia, they brazenly lie and bomb us, civilians and children die too.
From fixexception.com
COMMAND EXIT STATUS – VARIABLE
1 Command Exit Status – 0 to 255; 2 No standard set of failure codes for all commands; 3 Checking Exit status using variable $? 4 Exit status of grep and fgrep; 5 Setting an exit …
From teaching.idallen.com
HOW TO SOLVE ERROR COMPILING AN ARDUINO SKETCH? — STACK OVERFLOW
For Windows: Arduino IDE 1.6.5r5 and previous: C:Users (username)AppDataRoamingArduino15. Arduino IDE 1.6.6 and later: C:Users …
From stackoverflow.com
Одна из самых неприятных ошибок — это ошибка компиляции для платы Аrduino Nano, с которой вам придется столкнуться не раз.
Содержание
- Синтаксические ошибки
- Ошибки компиляции плат Arduino uno
- Ошибка exit status 1 при компиляции для плат uno, mega и nano
- Ошибки библиотек
- Ошибки компилятора Ардуино
- Основные ошибки
- Ошибка: «avrdude: stk500_recv(): programmer is not responding»
- Ошибка: «a function-definition is not allowed here before ‘{‘ token»
- Ошибка: «No such file or directory / exit status 1»
- Ошибка: «expected initializer before ‘}’ token / expected ‘;’ before ‘}’ token»
- Ошибка: «… was not declared in this scope»
Синтаксические ошибки
Ардуино – одна из наиболее комфортных сред для начинающих инженеров, в особенности программистов, ведь им не приходится проектировать свои системы управления и делать множество других действий.
Сразу же при покупке они получают готовый набор библиотек на С99 и возможность, по необходимости, подтянуть необходимые модули в опен-соурс источниках.
Но и здесь не избежать множества проблем, с которыми знаком каждый программист, и одна из самых неприятных – ошибка компиляции для платы Аrduino nano, с которой вам придется столкнуться не раз. Что же эта строчка означает, какие у неё причины появления, и главное – как быстро решить данную проблему?
Для начала стоит немного окунуться в теорию, чтобы вы понимали причину возникновения данной строчки с текстом и не грешили лишний раз, что Ардуино уно не видит компьютер.
Как несложно догадаться, компиляция – приведение кода на языке Си к виду машинного (двоичного) и преобразование множественных функций в простые операции, чтобы те смогли выполняться через встроенные операнды процессора. Выглядит всё достаточно просто, но сам процесс компиляции происходит значительно сложнее, и поэтому ошибка во время проведения оной может возникать по десяткам причин.
Все мы уже привыкли к тому, что код никогда не запускается с первого раза, и при попытке запустить его в интерпретаторе вылезает десяток ошибок, которые приходится оперативно править. Компилятор действует схожим образом, за исключением того, что причины ошибок указываются далеко не всегда. Именно поэтому рекомендуется протестировать код сначала в среде разработки, и лишь затем уже приступать к его компиляции в исполняемые файлы под Ардуино.
Мы узнали, к чему приводит данный процесс, давайте разберёмся, как он происходит:
- Первое, что делает компилятор – подгружает все инклуднутые файлы, а также меняет объявленные дефайны на значения, которое для них указано. Это необходимо затем, чтобы не нужно было по нескольку раз проходиться синтаксическим парсером в пределах одного кода. Также, в зависимости от среды, компилятор может подставлять функции на место их объявления или делать это уже после прохода синтаксическим парсером. В случае с С99, используется второй вариант реализации, но это и не столь важно.
- Далее он проверяет первичный синтаксис. Этот процесс проводится в изначальном компилируемом файле, и своеобразный парсер ищет, были ли описаны приведенные функции ранее, подключены ли необходимые библиотеки и прочее. Также проверяется правильность приведения типов данных к определенным значениям. Не стоит забывать, что в С99 используется строгая явная типизация, и вы не можете засунуть в строку, объявленную integer, какие-то буквенные значения. Если такое замечается, сразу вылетает ошибка.
- В зависимости от среды разработки, иногда предоставляется возможность последний раз протестировать код, который сейчас будет компилироваться, с запуском интерпретатора соответственно.
- Последним идет стек из различных действий приведения функций, базовых операнд и прочего к двоичному коду, что может занять какое-то время. Также вся структура файлов переносится в исполняемые exe-шники, а затем происходит завершение компиляции.
Как можно увидеть, процесс не так прост, как его рисуют, и на любом этапе может возникнуть какая-то ошибка, которая приведет к остановке компиляции. Проблема в том, что, в отличие от первых трех этапов, баги на последнем – зачастую неявные, но всё ещё не связанные с алгоритмом и логикой программы. Соответственно, их исправление и зачистка занимают значительно больше времени.
А вот синтаксические ошибки – самая частая причина, почему на exit status 1 происходит ошибка компиляции для платы Аrduino nano. Зачастую процесс дебагинга в этом случае предельно простой.
Вам высвечивают ошибку и строчку, а также подсказку от оператора EXCEPTION, что конкретно не понравилось парсеру. Будь то запятая или не закрытые скобки функции, проблема загрузки в плату Аrduino возникнет в любом случае.
Решение предельно простое и логичное – найти и исправить непонравившийся машине синтаксис. Зачастую такие сообщения вылезают пачками, как на этапе тестирования, так и компилирования, поэтому вы можете таким образом «застопорить» разработку не один раз.
Не стоит этого страшиться – этот процесс вполне нормален. Все претензии выводятся на английском, например, часто можно увидеть такое: was not declared in this scope. Что это за ошибка arduino – на самом деле ответ уже скрыт в сообщении. Функция или переменная просто не были задекларированы в области видимости.
Ошибки компиляции плат Arduino uno
Другая частая оплошность пользователя, которая порождает вопросы вроде, что делать, если Аrduino не видит порт, заключается в том, что вы попросту забываете настроить среду разработки. IDE Ардуино создана под все виды плат, но, как мы указывали, на каждом контроллере помещается лишь ограниченное количество библиотек, и их наполнение может быть различным.
Соответственно, если в меню среды вы выбрали компиляцию не под тот МК, то вполне вероятно, что вызываемая вами функция или метод просто не будет найдена в постоянной памяти, вернув ошибку. Стандартно, в настройках указана плата Ардуино уно, поэтому не забывайте её менять. И обратная ситуация может стать причиной, по которой возникает проблема загрузки в плату на Аrduino uno.
Ошибка exit status 1 при компиляции для плат uno, mega и nano
И самое частое сообщение, для пользователей уно, которое выскакивает в среде разработки – exit 1. И оно же самое дискомфортное для отладки приложения, ведь тут необходимо учесть чуть ли не ядро системы, чтобы понять, где же кроется злополучный баг.
В документации указано, что это сообщение указывает на то, что не запускается ide Аrduino в нужной конфигурации, но на деле есть ещё десяток случаев, при которых вы увидите данное сообщение. Однако, действительно, не забывайте проверять разрядность системы, IDE и просматривать, какие библиотеки вам доступны для обращения на текущий момент.
Ошибки библиотек
Если произошла ошибка при компиляции скетча Ардуино, но не выводилось ни одно из вышеописанных сообщений, то можете смело искать баг в библиотеках МК. Это наиболее неприятное занятие для большинства программистов, ведь приходится лазить в чужом коде, но без этого никак.
Ведь банально причина может быть в устаревшем синтаксисе скачанного плагина и, чтобы он заработал, необходимо переписать его практически с нуля. Это единственный выход из сложившейся ситуации. Но бывают и более банальные ситуации, когда вы подключили библиотеку, функции из которой затем ни разу не вызвали, или просто перепутали название.
Ошибки компилятора Ардуино
Ранее упоминался финальный стек действий, при прогонке кода через компилятор, и в этот момент могут произойти наиболее страшные ошибки – баги самого IDE. Здесь конкретного решения быть не может. Вам никто не запрещает залезть в ядро системы и проверить там всё самостоятельно, но куда эффективнее будет откатиться до предыдущей версии программы или, наоборот, обновиться.
Основные ошибки
Ошибка: «avrdude: stk500_recv(): programmer is not responding»
Смотрим какая у нас плата? Какой порт используем? Сообщаем ардуино о правильной плате и порте. Возможно, что используете Nano, а указана Mega. Возможно, что указали неверный порт. Всё это приводит к сообщению: «programmer is not responding».
Решение:
В Arduino IDE в меню «Сервис» выбираем плату. В меню «Сервис → Последовательный порт» выбираем порт.
Ошибка: «a function-definition is not allowed here before ‘{‘ token»
Забыли в коде программы (скетча) закрыть фигурную скобку }.
Решение:
Обычно в Ардуино IDE строка с ошибкой подсвечивается.
Ошибка: «No such file or directory / exit status 1»
Подключаемая библиотека отсутствует в папке libraries.
Решение:
Скачать нужную библиотеку и скопировать её в папку программы — как пример — C:Program FilesArduinolibraries. В случае наличия библиотеки — заменить файлы в папке.
Ошибка: «expected initializer before ‘}’ token / expected ‘;’ before ‘}’ token»
Забыли открыть фигурную скобку {, если видим «initializer before». Ошибка «expected ‘;’ before ‘}’ token» — забыли поставить точку с запятой в конце командной строки.
Решение:
Обычно в Ардуино IDE строка с ошибкой подсвечивается.
Ошибка: «… was not declared in this scope»
Arduino IDE видит в коде выражения или символы, которые не являются служебными или не были объявлены переменными.
Решение:
Проверить код на использование неизвестных выражений или лишних символов.
17 июля 2018 в 13:23
| Обновлено 7 ноября 2020 в 01:20 (редакция)
Опубликовано:
Статьи, Arduino