Comments (3)
Problem with hx711, i comment it in MakeFile, fixed version
https://github.com/vladikoms/WiringOP-Zero
from wiringop-zero.
‘for’ loop initial declarations are only allowed in C99 or C11 mode
so
diff --git a/devLib/hx711.c b/devLib/hx711.c
index 3b54efb..33800f9 100644
--- a/devLib/hx711.c
+++ b/devLib/hx711.c
@@ -72,7 +72,8 @@ int hx711Read(uint8_t instId)
int data = 0;
// pulse the clock pin 24 times to read the data
- for (uint8_t i = 24; i--;)
+ uint8_t i;
+ for (i = 24; i--;)
{
digitalWrite(sClockPin[instId], HIGH);
@@ -83,7 +84,8 @@ int hx711Read(uint8_t instId)
}
// set the channel and the gain factor for the next reading using the clock pin
- for (int i = 0; i < sGainBits[instId]; i++)
+ int j;
+ for (j = 0; j < sGainBits[instId]; j++)
{
digitalWrite(sClockPin[instId], HIGH);
digitalWrite(sClockPin[instId], LOW);
@@ -100,7 +102,8 @@ int hx711Read(uint8_t instId)
int hx711ReadAverage(uint8_t times, uint8_t instId)
{
int64_t sum = 0;
- for (uint8_t i = 0; i < times; i++)
+ uint8_t i;
+ for (i = 0; i < times; i++)
{
sum += hx711Read(instId);
}
from wiringop-zero.
Thanks vladikoms
from wiringop-zero.
Related Issues (17)
- Spi not working! HOT 6
- OPI zero 2 plus
- not 100% compatible with wirining PI
- opi zero 2 plus H5 HOT 6
- error in build gpio.o: error adding symbols: Bad value (R_ARM_THM_MOVW_ABS_NC) HOT 4
- pinModeAlt not working (fixed) HOT 1
- Reading wrong value from ADC (wrong byte)
- Problem in interrupt function - wiringPiISR HOT 7
- Make Failed - ‘for’ loop initial declarations are only allowed in C99 or C11 mode HOT 3
- Requirements for Armbian Bionic Minimal
- build script: wrong shell interpreter
- Can I use it with C++?
- Build Fails HOT 1
- Incompatible pin mapping
- spidev1.0 not working HOT 7
- Failed to Create Static Library
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 wiringop-zero.