Recent Posts

Pages: [1] 2 3 ... 10
Microcontrollers / Re: 8x16 Segment display drive...
Last post by PaulRB - Today at 03:14 pm
there were so many pinned threads I just skipped all of them
I'm quite sure you are clever enough to work out which one I meant from the titles of those threads.

Module says it supports asynchronous transmission with start bit and stop bit.How can i do that
The program is the exact same (99.9999%) on both boards.

The button board is an Arduino Micro.

The program is rather big, I'll just post relevant RF parts.

Code: [Select]

//Pins for the RF24 module
#define CE_PIN A8
#define CSN_PIN A9
RF24 radio(CE_PIN, CSN_PIN); // Create a Radio

I'm using Struct to exchange data.
Code: [Select]
//Struct for data to send
typedef struct {
int rnd;
int type;
int msg;

RF setup:
Code: [Select]

//Setting up the RF24
radio.setDataRate(RF24_250KBPS); //best
radio.setPALevel(RF24_PA_MAX); //max power
radio.setChannel(125);//To avoid Wifi noise
radio.openReadingPipe(1, thisMasterAddress);
radio.setRetries(3, 15); // delay, count

The Loop:
Code: [Select]
void loop() {

do {

while (!radio.available());, sizeof(Data_Received));

btnNr = Data_Received.msg;

if (btnNr != buzzMashedDisplay[0][0] ) {
sendToBtn(btnNr, TURN_LED_ON);

Code: [Select]
void sendToBtn(int id, int c) {

Data_Sent.msg = c;

bool rslt;

//We have to stop listening before writing

radio.openWritingPipe(buttonAddress[id - 1]);

rslt = radio.write(&Data_Sent, sizeof(Data_Sent));

if (rslt) {
btnConnected[id] = true;
if (!radio.isAckPayloadAvailable()) {
Serial.println("  Acknowledge but no data ");
else {
btnConnected[id] = false;
Serial.println("  Tx failed");
//We start the listening again

Something is working as when I push the button the GC see data are incoming, but it always receive 0.

Same for sending data back to button, the button receive the data, but alwas 0.

They both send an acknowledge.

If I change the GC by a Mega everything is working fine.

I've tried to run Mega and GC in parallel, when I push the button the Mega react correctly, the GC receive 0....

The only thing I see, apart it's totally different MC, is the speed difference between both boards 16Mhz vs 120Mhz.
Could that be an issue for SPI ?

I've tried with many SPI_CLOCK_DIV16 values, without success, result is always the same.
Deutsch / Re: Serial verschluckt Daten ?
Last post by combie - Today at 03:13 pm
ich zumindest trolle schließlich nicht rum
:smiley-twist: Darüber kann man durchaus geteilter Meinung sein!  :smiley-twist:
What is the point of using a reference here? It has a truckload of cons and not a single pro.
I have a feeling it's related to this thread. Same variable name.
If your modem is connected to pin 3, why do you hook the interrupt to pin 2?
because this is Leonardo board

gfvalvo, to honest say I want to like train low level understanding/coding...  but in this particular case mentioned pin is not mistake. I can write digitalPinToInterrupt() and still losing caracters
oui c'est une pompe d'aquarium
Français / Re: ARDUINO : problèmes de té...
Last post by hbachetti - Today at 03:10 pm
Code: [Select]
avrdude: ser_open(): can't open device "/dev/ttyUSB1": No such file or directory

Étrange ce ttyUSB1
but as it turned out later, error was not  in "convert" error was in const :)
const unit8_t &port = 1;

is working , thank you all
Now it appears to be an XY problem even more than it was originally. The question is really why one'd even do that:

Code: [Select]
const unit8_t &port = 1;

What is the point of using a reference here? It has a truckload of cons and not a single pro.

Why not just a regular

Code: [Select]
const unit8_t port = 1;


Software / Re: Domanda per concetto base
Last post by maubarzi - Today at 03:08 pm
Le saldature non servono a tenere in posizione i componenti ma principalmente a consolidare le connessioni.
Una saldatura deve essere fatta bene per funzionare adeguatamente.

Dalle immagini si vede che le saldature che hai fatto sono anche abbastanza bruttine.
Si vede che c'è poco stagno e anche solo da un lato del connettore, una saldatura corretta deve occupare completamente la piazzola e quindi andare tutto attorno al connettore.

Poi deve anche essere fatta in un'unica soluzione in modo che lo stagno sia omogeneo e non fatta a pezzi con il rischio che non ci sia contatto tra i vari pezzi.
E' un po' come una gettata di cemento. Se dai una spatolara, aspetti che asciughi, dai la seconda, aspetti, dai la terza, ecc. alla fine ottieni tanti piccoli grumi di cemento non legati tra di loro, se invece scaldi e fondi bene tutto, ottieni una saldatura omogenea e il contatto è corretto e solido.
Prova a dare un occhio a questo video.
Mostra una piccola saldatura (ignora il primo pezzo dove dissalda) e come deve uscire.
Ho preso un video a caso perchè si vedono bene le piazzole e il risultato finale.
Pages: [1] 2 3 ... 10