Comments (2)
I made progress by placing the following code within the IF statements that pertain to them.
lcd.setCursor(0,0);
lcd.print("Set Speed");
lcd.setCursor(11,0);
lcd.print(" ");
lcd.setCursor(0,3);
lcd.print(" ");
lcd.setCursor(11,0);
lcd.print(TrlCtlSetSpd,0);
lcd.setCursor(0,3);
lcd.print(RPMStatus);
Along with this I eliminated the printing of blanks to erase previous text. This now applies all the filters to the canbus.
It is interesting though because I receive some messages much more frequently than others even though they should be sending at the same rate.
Could I just be overloading the arduino with how many messages it is receiving?
from arduino_can_bus_mcp2515.
I am able to get the first mask to work which corresponds to the first 2 filters. The issue is with the second mask and second set of filters (3-6). Is there something in the library I need to change to enable both masks?
There is no way to disable certain masks or filters. It is possible your program is doing too much in the receive if statement that messages are overflowing the first receive buffer in the protocol controller which moves that message to the second buffer, overwriting its contents. If you want to turn this off, you will need to modify the .cpp file of the library to disable the bukt bit, see below.
//Change this
mcp2515_modifyRegister(MCP_RXB0CTRL,
MCP_RXB_RX_MASK | MCP_RXB_BUKT_MASK,
MCP_RXB_RX_ANY | MCP_RXB_BUKT_MASK);
//To this
mcp2515_modifyRegister(MCP_RXB0CTRL,
MCP_RXB_RX_MASK | MCP_RXB_BUKT_MASK,
MCP_RXB_RX_ANY);
Could I just be overloading the arduino with how many messages it is receiving?
That is definitely possible. You are also updating the LCD with every received message. There are places where elseif statements would improve performance. I'd also suggest implementing a modified version of the "blink without delay" sketch included with the Ardunio IDE to update your LCD at a specific rate outside of the receive if statement.
It is interesting though because I receive some messages much more frequently than others even though they should be sending at the same rate.
I've explored CAN on several vehicles and I've never seen messages come at the same rate. Some are 10Hz, some at 1Hz and a few at 20Hz or faster.
from arduino_can_bus_mcp2515.
Related Issues (20)
- Error Sending Messages... HOT 4
- MCP_CAN on ESP8266 NodeMCU - SPI not correct? HOT 2
- ext not initialized in sendMsgBuf HOT 1
- Speed selection is incorrect. HOT 1
- Extended ID issue
- can this library be used with stm32f103c8t6?
- Required to Reinit Driver Consistently
- Is This Possible to send String data ?
- RobotDyn Shield HOT 4
- SdFat + MCP_CAN_lib
- RTR code HOT 1
- mcp_can.h no such file or directory error
- spelling error in repo name HOT 1
- Identifying Car Data MCP2515
- error compiling for ESP32 dev module HOT 2
- sharing the Arduino_CAN_BUS_MCP2515
- Drive(control) Motor With MCP2515
- Probably invalid transmission check?
- Install does not work in Windows 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino_can_bus_mcp2515.