Skip to content

Commit 8e0ab56

Browse files
committed
sync repos (mostly keeping build happy)
1 parent 3f6ab4d commit 8e0ab56

File tree

26 files changed

+230
-83
lines changed

26 files changed

+230
-83
lines changed

libraries/AD5144A/AD5144A.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -370,19 +370,25 @@ uint8_t AD51XX::readBack(const uint8_t rdac, const uint8_t mask)
370370
{
371371
// COMMAND 3 - page 20
372372
_wire->beginTransmission(_address);
373-
int a = _wire->write(0x30 | rdac);
373+
_wire->write(0x30 | rdac);
374+
_wire->write(mask);
375+
_wire->endTransmission();
376+
_wire->requestFrom(_address, (uint8_t)1);
377+
return _wire->read();
378+
379+
// int a = _wire->write(0x30 | rdac);
374380
// Serial.print("READBACK cmd: ");
375381
// Serial.print(a);
376-
a = _wire->write(mask);
382+
// a = _wire->write(mask);
377383
// Serial.print(" val: ");
378384
// Serial.print(a);
379-
a = _wire->endTransmission();
385+
// a = _wire->endTransmission();
380386
// Serial.print(" TX: ");
381387
// Serial.println(a);
382-
a = _wire->requestFrom(_address, (uint8_t)1);
388+
// a = _wire->requestFrom(_address, (uint8_t)1);
383389
// Serial.print(" RF: ");
384390
// Serial.println(a);
385-
return _wire->read();
391+
// return _wire->read();
386392
}
387393

388394

libraries/DEVRANDOM/examples/DEVRANDOM_demo/DEVRANDOM_demo.ino

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ void setup()
9393
Serial.println();
9494
delay(1000);
9595

96-
uint32_t x;
97-
fscanf((FILE*)&dr, "%lu", &x);
98-
Serial.print("UINT32: ");
99-
Serial.println(x, HEX);
100-
101-
uint16_t y;
102-
fscanf((FILE*)&dr, "%u", &y);
103-
Serial.print("UINT16: ");
104-
Serial.println(y, HEX);
96+
// uint32_t x;
97+
// fscanf((FILE*)&dr, "%lu", &x); // fails on ESP32
98+
// Serial.print("UINT32: ");
99+
// Serial.println(x, HEX);
100+
101+
// uint16_t y;
102+
// fscanf((FILE*)&dr, "%u", &y); // fails on ESP32
103+
// Serial.print("UINT16: ");
104+
// Serial.println(y, HEX);
105105

106106
// float f;
107107
// fscanf((FILE*)&dr, "%e", &f); // does not work on UNO.

libraries/DHTstable/examples/dht11_two/dht11_two.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ void setup()
2929
void loop()
3030
{
3131
Serial.print("DHT A:\t");
32-
int chk = DHT_A.read11(DHT11_PIN_A);
32+
DHT_A.read11(DHT11_PIN_A);
3333
Serial.print(DHT_A.getHumidity());
3434
Serial.print(",\t");
3535
Serial.println(DHT_A.getTemperature());
3636

3737

3838
Serial.print("DHT B:\t");
39-
chk = DHT_B.read11(DHT11_PIN_B);
39+
DHT_B.read11(DHT11_PIN_B);
4040
Serial.print(DHT_B.getHumidity());
4141
Serial.print(",\t");
4242
Serial.println(DHT_B.getTemperature());

libraries/FastTrig/examples/fastTrig_optimize/fastTrig_optimize.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ int optimize()
6969
flag = true;
7070
}
7171
}
72-
// if (flag) Serial.print('*'); // uncomment this as you want to spot the changes.
72+
if (flag) Serial.print('*'); // comment if you do not want see changes.
7373
isinTable16[i] = t + idx;
7474
Serial.print(isinTable16[i]);
7575
Serial.print(", ");

libraries/FastTrig/examples/fastTrig_test1/fastTrig_test1.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ bool test_hw_support() // to be elaborated
4747
d2 = micros() - start;
4848
Serial.println(d1);
4949
Serial.println(d2);
50+
Serial.println(y); // keep compiler happy
5051
Serial.println();
51-
return (d1 / d2) < 1.5; // just a guess for now.
52+
return (d1 / d2) < 1.5; // just a guess for now.
5253
}
5354

5455

libraries/FunctionGenerator/examples/functionGeneratorPlotter/functionGeneratorPlotter.ino

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// DATE: 2020-06-10
66
// URL: https://github.com/RobTillaart/FunctionGenerator
77
//
8-
// use a Serial plotter to show the data
8+
// use a Serial plotter to show the data
99

1010

1111
#include "functionGenerator.h"
@@ -16,8 +16,8 @@ funcgen gen;
1616
void setup()
1717
{
1818
Serial.begin(115200);
19-
// Serial.print("Start functionGeneratorPerformance - LIB VERSION: ");
20-
// Serial.println(FUNCTIONGENERATOR_LIB_VERSION);
19+
// Serial.print("Start functionGeneratorPerformance - LIB VERSION: ");
20+
// Serial.println(FUNCTIONGENERATOR_LIB_VERSION);
2121

2222
gen.setAmplitude(50);
2323
gen.setFrequency(1);
@@ -28,24 +28,24 @@ void loop()
2828
{
2929
float t = millis() * 0.001;
3030

31-
// UNCOMMENT WAVES YOU WANT TO SEE
32-
// DO NOT FORGET THE '\t' SEPARATOR PRINT
31+
// UNCOMMENT WAVES YOU WANT TO SEE
32+
// DO NOT FORGET THE '\t' SEPARATOR PRINT
3333

3434
// Serial.print(t, 3);
3535
// Serial.print("\t");
3636
// Serial.print(gen.square(t));
3737
// Serial.print("\t");
38-
// Serial.print(gen.sawtooth(t, 0)); // up /|
38+
// Serial.print(gen.sawtooth(t, 0)); // up /| signal
3939
// Serial.print("\t");
40-
// Serial.print(gen.sawtooth(t, 1)); // down |\
40+
// Serial.print(gen.sawtooth(t, 1)); // down |\ signal
4141
// Serial.print("\t");
4242
// Serial.print(gen.triangle(t));
4343
// Serial.print("\t");
4444
// Serial.print(gen.sinus(t));
4545
// Serial.print("\t");
46-
Serial.print(gen.stair(t, 16, 0)); // step up
46+
Serial.print(gen.stair(t, 16, 0)); // step up
4747
Serial.print("\t");
48-
Serial.print(gen.stair(t, 16, 1)); // step down
48+
Serial.print(gen.stair(t, 16, 1)); // step down
4949
Serial.print("\t");
5050
// Serial.print(gen.random());
5151
// Serial.print("\t");

libraries/I2C_24LC1025/examples/24LC1025_test/24LC1025_test.ino

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,14 @@ void dump(uint32_t from, uint32_t to)
5959
{
6060
char buffer[24];
6161
Serial.print('\n');
62-
sprintf(buffer, "%08lX\t", i);
62+
#if defined (ESP8266) || defined(ESP32)
63+
sprintf(buffer, "%08X\t", i); // ESP cast (long unsigned int)
64+
#else
65+
sprintf(buffer, "%08lX\t", i); // AVR needs lX
66+
#endif
6367
Serial.print(buffer);
6468
}
65-
sprintf(buffer, "%02X\t", ee.readByte(i));
69+
sprintf(buffer, "%02X\t", x);
6670
Serial.print(buffer);
6771
}
6872
Serial.println();

libraries/I2C_24LC1025/examples/24LC1025_test_read/24LC1025_test_read.ino

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,11 @@ void dump(uint32_t from, uint32_t to)
123123
{
124124
char buffer[24];
125125
Serial.print('\n');
126-
// sprintf(buffer, "%08X\t", i); // ESP cast (long unsigned int)
127-
sprintf(buffer, "%08lX\t", i); // AVR needs lX
126+
#if defined (ESP8266) || defined(ESP32)
127+
sprintf(buffer, "%08X\t", i); // ESP cast (long unsigned int)
128+
#else
129+
sprintf(buffer, "%08lX\t", i); // AVR needs lX
130+
#endif
128131
Serial.print(buffer);
129132
}
130133
sprintf(buffer, "%02X\t", ee.readByte(i));

libraries/I2C_EEPROM/examples/I2C_eeprom_updateBlock/I2C_eeprom_updateBlock.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ void dump(uint32_t from, uint32_t to)
129129
{
130130
char buffer[24];
131131
Serial.print('\n');
132-
sprintf(buffer, "%08lX\t", i);
132+
#if defined (ESP8266) || defined(ESP32)
133+
sprintf(buffer, "%08X\t", i); // ESP cast (long unsigned int)
134+
#else
135+
sprintf(buffer, "%08lX\t", i); // AVR needs lX
136+
#endif;
133137
Serial.print(buffer);
134138
}
135139
sprintf(buffer, "%02X\t", ee.readByte(i));

libraries/I2C_EEPROM/readme.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,21 @@ MicroChip 24LC512, 24LC256, 24LC64, 24LC32, 24LC16, 24LC08, 24LC04, 24LC02, 24LC
2020
The **I2C_eeprom_cyclic_store** interface is documented [here](README_cyclic_store.md)
2121

2222

23+
## Schematic
24+
25+
```cpp
26+
+---U---+
27+
A0 | 1 8 | VCC = +5V
28+
A1 | 2 7 | WP = write protect pin
29+
A2 | 3 6 | SCL = I2C clock
30+
GND | 4 5 | SDA = I2C data
31+
+-------+
32+
33+
default address = 0x50 .. 0x57 depending on three address lines
34+
35+
```
36+
37+
2338
## Interface
2439

2540
The interface is kept quite identical to the I2C_24LC1025 library.

0 commit comments

Comments
 (0)