Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

why can not work with arduino pro mini 168? #63

Open
werdegars opened this issue Oct 30, 2021 · 4 comments
Open

why can not work with arduino pro mini 168? #63

werdegars opened this issue Oct 30, 2021 · 4 comments

Comments

@werdegars
Copy link

upload code successfully, no errors

board consist pro mini 328 (4 pcs), and pro mini 168 3.3v 8Mhz ( 6 pcs)
start up everything,
all 4 pro mini 328 working fine but none pro mini 168 is working
why?

@malloc32
Copy link

malloc32 commented Jan 21, 2022

I have the same problem, with 328p works fine, but with 168p (16MHz, 5V) not works, I have try with some of them.
Here you can see the log:
HOST:
23:03:04.720 -> [0]Job a99e50adede68b1d9a3f1b468794835ff6e6686d,a985323681c219aca549e8523b5fb5e1e1fe595f,4
23:03:04.720 -> [0]Job Receive: 4
23:03:05.523 -> [ ]FreeRam: 39552 I2C [ 0. ]
23:03:06.521 -> [ ]FreeRam: 39552 I2C [ 0. ]
23:03:07.512 -> [ ]FreeRam: 39248 I2C [ 0. ]
23:03:08.508 -> [ ]FreeRam: 39248 I2C [ 0. ]
23:03:09.545 -> [ ]FreeRam: 39248 I2C [ 0. ]
23:03:10.542 -> [ ]FreeRam: 39248 I2C [ 0. ]
23:03:11.538 -> [ ]FreeRam: 39552 I2C [ 0. ]
23:03:12.531 -> [ ]FreeRam: 39552 I2C [ 0. ]
23:03:13.529 -> [ ]FreeRam: 39248 I2C [ 0. ]
23:03:14.522 -> [ ]FreeRam: 39248 I2C [ 0. ]
23:03:15.515 -> [ ]FreeRam: 39248 I2C [ 0. ]
23:03:16.505 -> [ ]FreeRam: 39552 I2C [ 0. ]
23:03:17.549 -> [ ]FreeRam: 39552 I2C [ 0. ]
23:03:18.545 -> [ ]FreeRam: 39552 I2C [ 0. ]
23:03:19.536 -> [ ]FreeRam: 39552 I2C [ 0. ]
23:03:20.532 -> [ ]FreeRam: 39552 I2C [ 0. ]
23:03:21.527 -> [ ]FreeRam: 39552 I2C [ 0. ]
23:03:22.523 -> [ ]FreeRam: 39552 I2C [ 0. ]
23:03:23.516 -> [ ]FreeRam: 39552 I2C [ 0. ]
23:03:24.510 -> [ ]FreeRam: 39552 I2C [ 0. ]
23:03:25.508 -> [ ]FreeRam: 39552 I2C [ 0. ]
23:03:26.547 -> [ ]FreeRam: 39552 I2C [ 0. ]
23:03:27.548 -> [ ]FreeRam: 39512 I2C [ 0. ]
23:03:28.540 -> [ ]FreeRam: 39512 I2C [ 0. ]
23:03:29.535 -> [ ]FreeRam: 39512 I2C [ 0. ]
23:03:30.531 -> [ ]FreeRam: 39512 I2C [ 0. ]
23:03:31.528 -> [ ]FreeRam: 39552 I2C [ 0. ]
23:03:32.527 -> [ ]FreeRam: 39552 I2C [ 0. ]
23:03:33.520 -> [ ]FreeRam: 39248 I2C [ 0. ]
23:03:34.515 -> [ ]FreeRam: 39248 I2C [ 0. ]
23:03:34.752 -> [0] --------------- TIMEOUT -------------
23:03:35.507 -> [ ]FreeRam: 39248 I2C [ 0 ]
23:03:36.541 -> [ ]FreeRam: 39552 I2C [ 0 ]
23:03:37.536 -> [ ]FreeRam: 39552 I2C [ 0 ]

CLIENT (168P)

23:39:47.350 -> UniqueID: 30 35 35 34 31 18 10 02
23:39:47.350 -> Wire Address: 1

bool DuinoCoin_loop()
this condition nevers appends if (bufferReceive.available() > 0 && bufferReceive.indexOf('\n') != -1) { buffer>0 yes, but not the other.

Thank you

@malloc32
Copy link

Can be a RAM problem? I have change code to use String instead StreamString and when string lenght is about 18 characters it stops to concatenate....

@malloc32
Copy link

malloc32 commented Jan 22, 2022

Now i have see that streamstring is a string extension.
I have modified to see what appends with this string. When it gets some length it is not grow up more.
The code:
void receiveEvent(int howMany) {
if (howMany == 0)
{
return;
}
while (Wire.available()) {
char c = Wire.read();
bufferReceive.write(c);
Serial.println(c);
Serial.println(bufferReceive);
}
}

The result:
13:48:26.306 -> 2
13:48:26.306 -> 2
13:48:26.306 -> 0
13:48:26.306 -> 20
13:48:26.306 -> d
13:48:26.306 -> 20d
13:48:26.306 -> 0
13:48:26.306 -> 20d0
13:48:26.306 -> c
13:48:26.306 -> 20d0c
13:48:26.306 -> 6
13:48:26.306 -> 20d0c6
13:48:26.306 -> 0
13:48:26.306 -> 20d0c60
13:48:26.306 -> d
13:48:26.306 -> 20d0c60d
13:48:26.306 -> 8
13:48:26.306 -> 20d0c60d8
13:48:26.306 -> 2
13:48:26.306 -> 20d0c60d82
13:48:26.306 -> a
13:48:26.306 -> 20d0c60d82a
13:48:26.306 -> 0
13:48:26.306 -> 20d0c60d82a0
13:48:26.306 -> c
13:48:26.306 -> 20d0c60d82a0c
13:48:26.306 -> 6
13:48:26.306 -> 20d0c60d82a0c6
13:48:26.306 -> d
13:48:26.306 -> 20d0c60d82a0c6d
13:48:26.306 -> 8
13:48:26.306 -> 20d0c60d82a0c6d8
13:48:26.306 -> b
13:48:26.306 -> 20d0c60d82a0c6d8b
13:48:26.306 -> 8
13:48:26.306 -> 20d0c60d82a0c6d8b8
13:48:26.306 -> 1
13:48:26.306 -> 20d0c60d82a0c6d8b81
13:48:26.306 -> d
13:48:26.306 -> 20d0c60d82a0c6d8b81d
13:48:26.306 -> a
13:48:26.306 -> 20d0c60d82a0c6d8b81da
13:48:26.306 -> 2
13:48:26.306 -> 20d0c60d82a0c6d8b81da2
13:48:26.306 -> 5
13:48:26.306 -> 20d0c60d82a0c6d8b81da25
13:48:26.306 -> 1
13:48:26.306 -> 20d0c60d82a0c6d8b81da251
13:48:26.306 -> 3
13:48:26.306 -> 20d0c60d82a0c6d8b81da2513
13:48:26.306 -> d
13:48:26.306 -> 20d0c60d82a0c6d8b81da2513d
13:48:26.306 -> 2
13:48:26.306 -> 20d0c60d82a0c6d8b81da2513d2
13:48:26.306 -> b
13:48:26.306 -> 20d0c60d82a0c6d8b81da2513d2b
13:48:26.306 -> f
13:48:26.306 -> 20d0c60d82a0c6d8b81da2513d2bf
13:48:26.306 -> e
13:48:26.306 -> 20d0c60d82a0c6d8b81da2513d2bfe
13:48:26.306 -> 3
13:48:26.306 -> 20d0c60d82a0c6d8b81da2513d2bfe3
13:48:26.306 -> 8
13:48:26.306 -> 20d0c60d82a0c6d8b81da2513d2bfe38
13:48:33.149 -> 5
13:48:33.149 -> 20d0c60d82a0c6d8b81da2513d2bfe385
13:48:33.197 -> 5
13:48:33.197 -> 20d0c60d82a0c6d8b81da2513d2bfe3855
13:48:33.197 -> c
13:48:33.197 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c
13:48:33.197 -> 9
13:48:33.197 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9
13:48:33.197 -> e
13:48:33.197 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e
13:48:33.197 -> 0
13:48:33.197 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e0
13:48:33.197 -> 5
13:48:33.197 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e05
13:48:33.197 -> 2
13:48:33.197 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052
13:48:33.197 -> f
13:48:33.197 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052f
13:48:33.197 -> d
13:48:33.197 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd
13:48:33.197 -> 9
13:48:33.197 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9
13:48:33.197 -> 8
13:48:33.197 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd98
13:48:33.245 -> 1
13:48:33.245 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd981
13:48:33.245 -> 8
13:48:33.245 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818
13:48:33.245 -> b
13:48:33.245 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818b
13:48:33.245 -> e
13:48:33.245 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818be
13:48:33.245 -> 2
13:48:33.245 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818be2
13:48:33.245 -> c
13:48:33.245 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818be2
13:48:33.245 -> 7
13:48:33.245 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818be2
13:48:33.245 -> d
13:48:33.245 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818be2
13:48:33.245 -> e
13:48:33.245 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818be2
13:48:33.245 -> 8
13:48:33.245 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818be28
13:48:33.291 -> 9
13:48:33.291 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818be28
13:48:33.291 -> a
13:48:33.291 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818be28
13:48:33.291 -> e
13:48:33.291 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818be28
13:48:33.291 -> c
13:48:33.291 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818be28
13:48:33.291 -> 3
13:48:33.291 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818be28
13:48:33.291 -> 8
13:48:33.291 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818be28
13:48:33.291 -> a
13:48:33.291 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818be28
13:48:33.291 -> f
13:48:33.291 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818be28f
13:48:33.291 -> d
13:48:33.291 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818be28f
13:48:33.339 -> f
13:48:33.339 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818be28f
13:48:33.339 -> 5
13:48:33.339 -> 20d0c60d82a0c6d8b81da2513d2bfe3855c9e052fd9818be28f
13:48:33.339 -> 6

So, we can see that the string has a strange limit....
I have remove all reference to Serial library to increse memory, about a 20% more and still it does not work... From abut 319 free bytes to 494 bytes. I put a blink after if (bufferReceive.available() > 0 && bufferReceive.indexOf('\n') != -1) and led blink, but I think that after does not work because RAM is too low.

Even i have reserved memory to this string bufferReceive.reserve(100);

If a removed the call to Duino_loop(), then It has more free RAM and output is OK:

17:25:12.627 -> Wire Address: 1
17:25:13.475 -> f
17:25:13.475 -> f
17:25:13.475 -> 9
17:25:13.475 -> f9
17:25:13.475 -> 6
17:25:13.475 -> f96
17:25:13.475 -> b
17:25:13.475 -> f96b
17:25:13.475 -> a
17:25:13.475 -> f96ba
17:25:13.475 -> 1
17:25:13.475 -> f96ba1
17:25:13.475 -> 7
17:25:13.475 -> f96ba17
17:25:13.475 -> 7
17:25:13.475 -> f96ba177
17:25:13.475 -> 2
17:25:13.475 -> f96ba1772
17:25:13.475 -> e
17:25:13.475 -> f96ba1772e
17:25:13.475 -> 1
17:25:13.475 -> f96ba1772e1
17:25:13.475 -> c
17:25:13.475 -> f96ba1772e1c
17:25:13.475 -> e
17:25:13.475 -> f96ba1772e1ce
17:25:13.475 -> 4
17:25:13.475 -> f96ba1772e1ce4
17:25:13.475 -> b
17:25:13.475 -> f96ba1772e1ce4b
17:25:13.475 -> 8
17:25:13.475 -> f96ba1772e1ce4b8
17:25:13.475 -> a
17:25:13.475 -> f96ba1772e1ce4b8a
17:25:13.475 -> b
17:25:13.475 -> f96ba1772e1ce4b8ab
17:25:13.475 -> 8
17:25:13.475 -> f96ba1772e1ce4b8ab8
17:25:13.475 -> c
17:25:13.475 -> f96ba1772e1ce4b8ab8c
17:25:13.475 -> 4
17:25:13.475 -> f96ba1772e1ce4b8ab8c4
17:25:13.475 -> c
17:25:13.475 -> f96ba1772e1ce4b8ab8c4c
17:25:13.475 -> 7
17:25:13.475 -> f96ba1772e1ce4b8ab8c4c7
17:25:13.475 -> 2
17:25:13.475 -> f96ba1772e1ce4b8ab8c4c72
17:25:13.475 -> a
17:25:13.475 -> f96ba1772e1ce4b8ab8c4c72a
17:25:13.475 -> 4
17:25:13.475 -> f96ba1772e1ce4b8ab8c4c72a4
17:25:13.475 -> b
17:25:13.475 -> f96ba1772e1ce4b8ab8c4c72a4b
17:25:13.523 -> 7
17:25:13.523 -> f96ba1772e1ce4b8ab8c4c72a4b7
17:25:13.523 -> c
17:25:13.523 -> f96ba1772e1ce4b8ab8c4c72a4b7c
17:25:13.523 -> 6
17:25:13.523 -> f96ba1772e1ce4b8ab8c4c72a4b7c6
17:25:13.523 -> 4
17:25:13.523 -> f96ba1772e1ce4b8ab8c4c72a4b7c64
17:25:13.523 -> 4
17:25:13.523 -> f96ba1772e1ce4b8ab8c4c72a4b7c644
17:25:13.523 -> d
17:25:13.523 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d
17:25:13.523 -> 3
17:25:13.523 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d3
17:25:13.523 -> 8
17:25:13.523 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38
17:25:13.523 -> b
17:25:13.523 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38b
17:25:13.523 -> f
17:25:13.523 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf
17:25:13.523 -> 5
17:25:13.523 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf5
17:25:13.523 -> 7
17:25:13.523 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57
17:25:13.523 -> a
17:25:13.523 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a
17:25:13.523 -> ,
17:25:13.523 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,
17:25:13.571 -> e
17:25:13.571 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e
17:25:13.571 -> 8
17:25:13.571 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e8
17:25:13.571 -> 2
17:25:13.571 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82
17:25:13.571 -> 4
17:25:13.571 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e824
17:25:13.571 -> 5
17:25:13.571 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e8245
17:25:13.571 -> 8
17:25:13.571 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458
17:25:13.571 -> c
17:25:13.571 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c
17:25:13.571 -> 9
17:25:13.571 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9
17:25:13.571 -> f
17:25:13.571 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9f
17:25:13.571 -> d
17:25:13.571 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd
17:25:13.619 -> 8
17:25:13.619 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd8
17:25:13.619 -> 2
17:25:13.619 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82
17:25:13.619 -> 7
17:25:13.619 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd827
17:25:13.619 -> 4
17:25:13.619 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd8274
17:25:13.619 -> 3
17:25:13.619 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743
17:25:13.619 -> b
17:25:13.619 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b
17:25:13.619 -> 5
17:25:13.619 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5
17:25:13.619 -> d
17:25:13.619 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d
17:25:13.619 -> 1
17:25:13.619 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1
17:25:13.619 -> 0
17:25:13.619 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d10
17:25:13.619 -> 2
17:25:13.619 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d102
17:25:13.619 -> 9
17:25:13.619 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029
17:25:13.619 -> d
17:25:13.619 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d
17:25:13.619 -> 2
17:25:13.619 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d2
17:25:13.666 -> 3
17:25:13.666 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d23
17:25:13.666 -> b
17:25:13.666 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d23b
17:25:13.666 -> 0
17:25:13.666 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d23b0
17:25:13.666 -> 5
17:25:13.666 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d23b05
17:25:13.666 -> 4
17:25:13.666 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d23b054
17:25:13.666 -> 3
17:25:13.666 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d23b0543
17:25:13.666 -> 5
17:25:13.666 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d23b05435
17:25:13.714 -> 1
17:25:13.714 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d23b054351
17:25:13.714 -> 0
17:25:13.714 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d23b0543510
17:25:13.714 -> 9
17:25:13.714 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d23b05435109
17:25:13.714 -> c
17:25:13.714 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d23b05435109c
17:25:13.714 -> 7
17:25:13.714 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d23b05435109c7
17:25:13.714 -> 5
17:25:13.714 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d23b05435109c75
17:25:13.761 -> 2
17:25:13.761 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d23b05435109c752
17:25:13.761 -> 3
17:25:13.761 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d23b05435109c7523
17:25:13.761 -> 4
17:25:13.761 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d23b05435109c75234
17:25:13.761 -> ,
17:25:13.761 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d23b05435109c75234,
17:25:13.761 -> 4
17:25:13.761 -> f96ba1772e1ce4b8ab8c4c72a4b7c644d38bf57a,e82458c9fd82743b5d1029d23b05435109c75234,4

But not works... sorry I'm newbie.

Thank you.

@malloc32
Copy link

After trying to get moe and more memory the result was:
19:07:28.438 -> [0]0,194.51,AVR I2C v2.7.3,AVR-I2C-0
19:07:28.438 -> [ ]FreeRam: 38768 I2C [ 0. ]
19:07:28.484 -> [0]Job BAD,Incorrect result: Share #140 0:07:25
19:07:28.484 -> [0]Job Request: malloc32
19:07:28.532 -> [0]Job 165444811d1d658d7f338a5c835446631f3ffbd9,d29d9729288207265738c512e193a82c22f28a7a,4
So it does not work.
:(, I think that best solution is to use char[] instead String, but I have not the necessary knowledge.

Thank you.

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

No branches or pull requests

2 participants