Sketch für Mittns ECU Key Calculator

  • Dieser Sketch ist angepasst für die Anwendung Mittns ECU Key Calculator.

    Ist ein Ausschnitt von meinem anderen Projekt, daher sind nur die notwendigsten Funktionen im Sketch enthalten.



    Anleitung zur Verdrahtung des Arduino's mit dem MCP2515 Modul, findet ihr hier.



    Benötigte Library's:


    Benötigtes Material:


    Changelog:

    • v1.0.1 - Typo Zeile 131





    308 GTi (╯°□°)╯︵ ┻━┻

    Einmal editiert, zuletzt von Mittns () aus folgendem Grund: v1.0.1

  • I'm trying to upload and I have an error, I don't know if the library is bad


    Error:



    Arduino:1.8.19 (Windows 7), Płytka:"Arduino Nano, ATmega328P"



    In file included from C:\Users\Krzysiek\Documents\Arduino\Mittns_ECU_Key_Calculator.ino\Mittns_ECU_Key_Calculator.ino.ino:21:0:


    C:\Users\Krzysiek\Documents\Arduino\libraries\bibioteki/mcp_can.h:27:10: fatal error: mcp_can_dfs.h: No such file or directory


    #include "mcp_can_dfs.h"


    ^~~~~~~~~~~~~~~


    compilation terminated.


    exit status 1


    Błąd kompilacji dla płytki Arduino Nano.




    Ten raport powinien zawierać więcej informacji jeśli w

    File -> Preferencje zostanie włączona opcja "Pokaż

    szczegółowe informacje podczas kompilacji"

  • If you need help, post the error messages in english.


    This compilation error seems to be a wrong Bootloader setting in the IDE for the nano.


    And why do you include "mcp_can_dfs.h"?

    This isn't necessary.

  • Sorry, I'm using a translator
    I added only what you gave and found in google, it seems to me that the problem is in the library,
    I downloaded the libraries from


    MCP_CAN_lib/mcp_can.h at master · coryjfowler/MCP_CAN_lib
    MCP_CAN Library. Contribute to coryjfowler/MCP_CAN_lib development by creating an account on GitHub.
    github.com


    line 27 #include "mcp_can_dfs.h"




    I don't know if the sources are checked here on this forum, I couldn't find the library

  • That's the correct library.

    You just need to add the library to the Arduino IDE and then copy the sketch 1:1.


    After that, it works.

  • Arduino:1.8.19 (Windows 7), Płytka:"Arduino Nano, ATmega328P"



    C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Krzysiek\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -ide-version=10819 -build-path C:\Users\Krzysiek\AppData\Local\Temp\arduino_build_258815 -warnings=none -build-cache C:\Users\Krzysiek\AppData\Local\Temp\arduino_cache_426661 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Krzysiek\Documents\Arduino\Mittns_ECU_Key_Calculator.ino\Mittns_ECU_Key_Calculator.ino.ino


    C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Krzysiek\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -ide-version=10819 -build-path C:\Users\Krzysiek\AppData\Local\Temp\arduino_build_258815 -warnings=none -build-cache C:\Users\Krzysiek\AppData\Local\Temp\arduino_cache_426661 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Krzysiek\Documents\Arduino\Mittns_ECU_Key_Calculator.ino\Mittns_ECU_Key_Calculator.ino.ino


    Using board 'nano' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr


    Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr


    Detecting libraries used...


    "C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\Krzysiek\\AppData\\Local\\Temp\\arduino_build_258815\\sketch\\Mittns_ECU_Key_Calculator.ino.ino.cpp" -o nul


    Alternatives for Thread.h: [bibioteki]


    ResolveLibrary(Thread.h)


    -> candidates: [bibioteki]


    "C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "-IC:\\Users\\Krzysiek\\Documents\\Arduino\\libraries\\bibioteki" "C:\\Users\\Krzysiek\\AppData\\Local\\Temp\\arduino_build_258815\\sketch\\Mittns_ECU_Key_Calculator.ino.ino.cpp" -o nul


    Alternatives for mcp_can_dfs.h: []


    ResolveLibrary(mcp_can_dfs.h)


    -> candidates: []


    In file included from C:\Users\Krzysiek\Documents\Arduino\Mittns_ECU_Key_Calculator.ino\Mittns_ECU_Key_Calculator.ino.ino:21:0:


    C:\Users\Krzysiek\Documents\Arduino\libraries\bibioteki/mcp_can.h:27:10: fatal error: mcp_can_dfs.h: No such file or directory


    #include "mcp_can_dfs.h"


    ^~~~~~~~~~~~~~~


    compilation terminated.


    Użycie biblioteki bibioteki z folderu C:\Users\Krzysiek\Documents\Arduino\libraries\bibioteki (legacy)


    exit status 1



    I only have the ones you provided


    Błąd kompilacji dla płytki Arduino Nano.

  • BE sure using right com Port , also Take old bootloader and try again.

  • Your can library is missing.

    Not included correctly.

  • Ich habe von Programmieren nahezu null Ahnung, aber kann das Problem auch damit zusammenhängen, dass der Key Calculator erst für "Mitglieder der Stufe 2" (ab 21 Beiträge) nutzbar sein soll?


    Solche Einschränkungen werden ja von vielen Usern "überlesen" / ignoriert....

  • In diesem Fall nicht, er hat Probleme, den Sketch auf den Arduino zu flashen.


    Laut Fehlermeldung hat er die benötigte Bibliothek nicht richtig heruntergeladen oder importiert und wenn Abhängigkeiten der Bibliothek im Sketch fehlen, flasht das Programm nicht.


    Im Ersten Post oben war es wieder was anderes, da hat er den falschen Bootloader ausgewählt.

    Je nachdem, wo man die Arduinos kauft, haben die unterschiedliche (veraltete) Bootloader und den richtigen muss man in der Arduino IDE auswählen. :)

  • Hello. How do I check what ver I have and how to check this loader


    I installed a newer version of Arduino 2.0.3

    and after loading the sketch and doing the verification


    I don't understand why it calls mcp_can_dfs.h file


    error


    In file included from C:\Users\Krzysiek\Documents\Arduino\Mittns_ECU_Key_Calculator.ino\Mittns_ECU_Key_Calculator.ino.ino:21:0:

    C:\Users\Krzysiek\Documents\Arduino\libraries\bibioteki/mcp_can.h:27:10: fatal error: mcp_can_dfs.h: No such file or directory

    #include "mcp_can_dfs.h"

    ^~~~~~~~~~~~~~~

    compilation terminated.


    exit status 1


    Compilation error: exit status 1

    Einmal editiert, zuletzt von krzysztof90 () aus folgendem Grund: Merged a post created by krzysztof90 into this post.

  • Is "#include "mcp_can_dfs.h" in the sketch somehow?


    Otherwise i would say, delete EVERY can library from your documents folder and then download this library again.

    Then install it via "Sketch > Tools > Include Library > Add .ZIP Library..."

  • Just everything, I'm cleaning all files and I'll reinstall the libraries I downloaded from another source


    mcp_can
    MCP_CAN Library
    www.arduinolibraries.info

    ArduinoThread
    A simple way to run Threads on Arduino
    www.arduinolibraries.info


    The Successs SPI library does not need to be installed
    https://www.arduino.cc/referen…ctions/communication/spi/

    Now the question is how to easily check the interface

    Einmal editiert, zuletzt von krzysztof90 () aus folgendem Grund: Merged a post created by krzysztof90 into this post.

  • The Successs SPI library does not need to be installed

    No, it's already available when installing Arduini IDE. ;)


    Now the question is how to easily check the interface

    Start my application, switch to the arduino tab, connect the arduino via com port and select the button for getting the configs from arduino.



    I have not yet bothered to translate the application in english. :P

  • Successs Detected

    I had to check if the BSI Diagbox coding works

    What is the order to run the coding in BSI using Diagbox I have to change the Parking Assist options Rear to Front and Rear in the family car Citroen C4 SpaceTourer Grand 2019

  • What is the order to run the coding in BSI using Diagbox

    First unlock the ecu with my tool and then immediately click on coding in diagbox.

    Coding must be done within 4-5 seconds after unlock.


    But this thread is about the sketch, so ask in the other thread about the application.

  • Thank you very much for the information

  • Benötigtes Material:

    Ich wollte eben Arduino nano every mit MCP2515 bestellen und habe beim DEV: Mittns ECU Key Calculator gesehen das jemand ein anschlussschema für Arduino UNO mit Relais Modul hat.
    Gibt es für das Arduino Nano auch ein anschlussschema ?
    habt ihr bereits gesehen das es Das MCP2551 gibt wenn ja was wäre da anderst ?


    tut mir leit leute das ich direkt so viele fragen habe, ich bin im Arduinobereich ein totaler anfänger. Aber einen funktionierenden VM diagbox inklusiv interface habe ich.

    Ich muss das problem selbst beheben in die werkstatt zu fahren und die erstmall alles ersetzen lassen bei schweizerpreissen darauf habe ich keine Lust😅

  • Würde sagen, Augen auf im Straßenverkehr.


  • Oke vielen danke.

    Finde es komisch ich habe über die suchfunktion nach Arduino gesucht und dieser wurde mir nicht angezeigt. Aber muss was loswerden gefällt mir wie schnell hier geantwortet wird wenn das klappt gibts was in die Kaffekasse. Jetzt mal bestellen und abwarten.😁

Jetzt mitmachen!

Hey! Es scheint, als ob Dir dieser Austausch gefällt, aber Du hast bisher noch kein Benutzerkonto erstellt. Mit einem Konto kannst Du über neue Antworten informiert werden, Foto's in unsere Galerie hochladen, unsere Tools nutzen, anderen mit einem „Gefällt mir“ danken oder selbst dabei unterstützen, anderen zu helfen. Gemeinsam können wir dazu beitragen, diese Community zu etwas größerem zu machen.