{"id":25697941,"url":"https://github.com/codeljo/aa_mcp2515","last_synced_at":"2025-04-28T14:44:53.156Z","repository":{"id":198156599,"uuid":"698820411","full_name":"codeljo/AA_MCP2515","owner":"codeljo","description":"CAN Controller Library for Arduino","archived":false,"fork":false,"pushed_at":"2024-08-05T07:12:25.000Z","size":34,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-05T08:37:40.869Z","etag":null,"topics":["arduino-library","can-bus"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeljo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-10-01T04:12:11.000Z","updated_at":"2024-08-05T07:10:13.000Z","dependencies_parsed_at":"2024-01-04T12:23:43.128Z","dependency_job_id":"e9cc5683-0911-43aa-9805-fcccd8da8621","html_url":"https://github.com/codeljo/AA_MCP2515","commit_stats":null,"previous_names":["codeljo/aa_mcp2515"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeljo%2FAA_MCP2515","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeljo%2FAA_MCP2515/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeljo%2FAA_MCP2515/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeljo%2FAA_MCP2515/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeljo","download_url":"https://codeload.github.com/codeljo/AA_MCP2515/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240590289,"owners_count":19825538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino-library","can-bus"],"created_at":"2025-02-25T02:34:42.586Z","updated_at":"2025-02-25T02:34:42.995Z","avatar_url":"https://github.com/codeljo.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AA_MCP2515\n\n## MCP2515 CAN Controller Library for Arduino\n\n\u003cbr\u003e\n\n## Features\n\n* Supports the Microchip MCP2510, and MCP2515 CAN Controllers.\n\n* Crystals - 8, 10, 16, 20 MHz crystals are preconfigured. Any other crystal speed can be added via `CANConfig`.\n\n* Bitrate - 10, 20, 50, 125, 250, 500, 1000 (kbit/s) (kbps) are preconfigured. Any other bitrate can be added via `CANConfig`.\n\n* Interrupts - Support for receive, and wakeup interrupts.\n\n* Filters - Support for receive filters based on 11-bit and 29-bit ID's.\n\n* Many examples included to easily add CAN to your project.\n\n\u003cbr\u003e\n\n## Connections\n\nMCP2515 | Uno | Nano | Leonardo | Mega 2560 | Uno R4\n------- | --- | ---- | -------- | ---- | ------\nSPI CS (SS) | 10 | 10 | 10 | 53 | 10\nSPI MOSI (SI) | 11 | 11 | 11 | 51 | 11\nSPI MISO (SO) | 12 | 12 | 12 | 50 | 12\nSPI Clock (SCK) | 13 | 13 | 13 | 52 | 13\nInterrupt (INT) | 2 | 2 | 2 | 2 | 2\n\n## Version History\n\n\u003e `1.0.7` - UNO R4 Minima, and UNO R4 WiFi bug fixes.\n\n\u003e `1.0.6` - Nano Every bug fix.\n\n\u003e `1.0.5` - ESP32 based boards are now supported.\n\n\u003cbr\u003e\n\n## Example Usage\n\nNote: Refer to the `examples` folder for complete ready to run examples.\n\n### CANConfig\n\n```cpp\n#include \"AA_MCP2515.h\"\n\nconst CANBitrate::Config CAN_BITRATE = CANBitrate::Config_8MHz_500kbps;\nconst uint8_t CAN_CS = 10;\nconst int8_t CAN_INT = 2;\n\nCANConfig config(CAN_BITRATE, CAN_CS, CAN_INT);\n\n// -or- specify SPI, and SPI speed\n\nconst uint32_t CAN_SPI_HZ = 8000000;\nCANConfig config(CAN_BITRATE, CAN_CS, CAN_INT, SPI, CAN_SPI_HZ);\n```\n\n### CANController\n\n```cpp\nCANController CAN(config);\nCAN.begin(CANController::Mode::Normal);\n```\n\n### Transmit\n\n```cpp\nuint8_t data[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 };\n\nCANFrame frame(0x100, data, sizeof(data));\nCAN.write(frame);\n\n// -or-\n\nCAN.write(0x100, data, sizeof(data));\n```\n\n### Receive\n\n```cpp\nCANFrame frame;\nif (CAN.read(frame) == CANController::IOResult::OK) {\n    frame.print(\"RX\");\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeljo%2Faa_mcp2515","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeljo%2Faa_mcp2515","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeljo%2Faa_mcp2515/lists"}