Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wire library for A-Star 328PB broken with version 5.0.0 #12

Closed
jacky4566 opened this issue Aug 2, 2022 · 2 comments
Closed

Wire library for A-Star 328PB broken with version 5.0.0 #12

jacky4566 opened this issue Aug 2, 2022 · 2 comments

Comments

@jacky4566
Copy link

Looks like the latest changes broke some of the the TWI I2C linking.

Steps to reproduce:

  • New Sketch with Polulu A-star 328PB @ 3.3V, 8 MHz
  • #include <Wire.h>
  • compile

Error: "'TWSR' undeclared" and other references missing.

@DavidEGrayson DavidEGrayson changed the title TWI driver broken with Version 5.0 Wire library for A-Star 328PB broken with version 5.0.0 Aug 2, 2022
@DavidEGrayson
Copy link
Member

Thank you for reporting this issue to us. As a workound for now, I recommend adding the following line to the A-Star boards.txt to define the things that the Wire library uses:

a-star328PB.build.extra_flags=-DTWBR=TWBR0 -DTWSR=TWSR0 -DTWAR=TWAR0 -DTWDR=TWDR0 -DTWCR=TWCR0 -DTWAMR=TWAMR0 -DTWI_vect=TWI0_vect

You can add that line anywhere in boards.txt. If you are using Windows and installed the A-Star package in the usual way, that file should be in:

C:\Users\[username]\AppData\Local\Arduino15\packages\pololu-a-star\hardware\avr\5.0.0

We will look into fixing this in a more permanent way. Please let me know if you have any further questions.

@DavidEGrayson
Copy link
Member

DavidEGrayson commented Sep 1, 2022

The latest version (5.1.0) fixes the Wire library and the SPI library, and it also adds menus in the Arduino IDE so you can select which buses those libraries use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants