Notifications
Clear all

[Sticky] Components & Programming

144 Posts
20 Users
11 Reactions
29.3 K Views
(@mevero)
Member
Joined: 3 years ago
Posts: 22
 

For ESP-Now the possibility  to use two led's and two buttons the system works perfect now but I will try it with two led's and two buttons. And my programming  knowledge is not so good that I can program it. I will be vrry happy if someone will and could help me.

Stanks   Wim


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7297
 

@mevero Very confusing

For ESP-Now the possibility  to use two led's and two buttons the system works perfect now but I will try it with two led's and two buttons.

Are you trying the examples? Since we can't see what you are doing, VERY good explanations and screen grabs are required.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
(@mevero)
Member
Joined: 3 years ago
Posts: 22
 

Here a part of the program,one button/led works perfect 

Answeryourquestion

 


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7297
 

@mevero Incomplete info.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
(@mevero)
Member
Joined: 3 years ago
Posts: 22
 

This is a part of the program I try to declared the two new items, I thought when

Answeryourquestion

I made this first step there might be no problem only a declaration.

20240416 201749S

 This is how it looks now a part because I use 3 ESP32


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7297
 

@mevero Post the code that is running in each of the 3 ESP32s. Help on how to do that is above and to the right. Why 3, it should be 2.

Post a wiring schematic, it's almost impossible to understand a photo of wiring unless you flatten it.

Screenshot 2024 05 24 at 11.05.22

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
(@mevero)
Member
Joined: 3 years ago
Posts: 22
 

On YouTube I saw  ESP-NON form the workshop.

The link: ESP NOW - Peer to Peer ESP32 Communications (dronebotworkshop.com)

This is for me the complete documentation.

Sorry for my bad communication  !! I try in English butI am form the Netherlands !!

More than this i cannot do  sorry.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7297
 

@mevero That helps. So you are using Bill's Broadcast Sketch.

What do you expect to happen? / Wat verwacht je dat er zal gebeuren?

What does happen? / Wat gebeurt er?

Your earlier post seems to say you modified the sketch to do two buttons/lights but now you can't even get Bills sketch to work. POlease clarify (might be best to just do Bills sketch and get that working before modifying it)

Je eerdere bericht lijkt te zeggen dat je de schets hebt aangepast om twee knoppen/lampjes te maken, maar nu kun je de Bills-schets niet eens laten werken. POlease verduidelijken (het is misschien het beste om gewoon een Bills-schets te maken en dat werkend te krijgen voordat je het wijzigt)

 

Write your reply in Dutch, I can translate. Or write it in Dutch iun the Google translator and paste the English here.

This is what Google Translator looks like.

 

Schrijf uw antwoord in het Nederlands, ik kan het vertalen. Of schrijf het in het Nederlands met de Google-vertaler en plak het Engels hier.

Zo ziet Google Translator eruit.

Screenshot 2024 05 24 at 12.41.11

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
(@mevero)
Member
Joined: 3 years ago
Posts: 22
 

Sorry maar  het programma zoals in de youtube te zien is werkt prima !!!

Wilde het aanpassen om twee led's en twee knopjes te laten werken.

Vandaar de "kleine"poging om het programma te wijzigen.

En dat is NIET gelukt, maar het moet dat begrijp ik nog verder aaangepast  worden,

Daarvoor was mijn hulp vraag, wil graag leuke dingen doen maar zonder hulp gaat dat en dat begrijp ik niet l

Hoop dat je me kan helpen .

Soms denk ik als je (nu 74 ben ) moetje dit laten.

Toch hoop ik op een werkend programma met twee led's en knopjes.

M.vr.gr.  Wim


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7297
 

@mevero Ik heb het beleid om geen volledige antwoorden of code te geven, maar alleen te laten zien hoe ik daar kan komen. Als ik jouw code schrijf, hoe leer je dan iets?
Als u verder wilt gaan, zal ik u vertellen hoe u kunt doen wat u wilt. Ik zal je ook een gedeeltelijk voltooide schets geven als je dat wilt, maar je zult veel meer leren door het zelf te doen. Het is niet moeilijk, eigenlijk best gemakkelijk en slechts een bescheiden hoeveelheid nieuwe code die grotendeels van het origineel wordt gekopieerd. Hoe wilt u verder gaan

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
(@mevero)
Member
Joined: 3 years ago
Posts: 22
 

Heel erg bedankt voor je reactie wil graag iets leren !!!  Hierbij naar aanleiding van je aanwijzingen een eerste poging. Nog bedankt kijk uit naar je reactie,


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7297
 

@mevero Oké, de gemakkelijkste manier om te beginnen is wat ik noem: alles veranderen, maar niets veranderen. Hernoem de variabelen die aan de knop en de led zijn gekoppeld, door aan elke variabele _1 toe te voegen. Ik gebruikte de Arduino IDE 2 find-opdracht Ctl-F. De eerste is buttonDown, er zijn 4 exemplaren. Klik op de > aan de linkerkant om het vak Vervangen weer te geven en typ buttonDown_1. Klik nu op Alles wijzigen of voer één voor één uit. Doe hetzelfde voor het volgende. ledOn, StatusLed en StatusButton. De eenvoudigste manier is om te dubbelklikken op de naam van de variabele en vervolgens op Ctl-E om ze allemaal te vinden. Om te testen, voer je een verificatie uit (echte programmeurs noemen dat compileren). Het zou foutloos moeten zijn.

Dupliceer nu elke variabele die u hebt hernoemd naar _1, maar verander _1 in _2.
Heeft dit nu zin?
U moet pincodes aan de twee statusvariabelen toewijzen en uiteindelijk de draden dienovereenkomstig aansluiten.
Opnieuw compileren.
Nu laat ik je achter om te proberen het af te maken, maar als je vastloopt, laat het me weten.
Maak eerst een kopie.
Gebruik eenvoudigweg Zoeken om de code rond elke variabele te bekijken die eindigt op _1. Maak een kopie van die code en verander deze in _2.
Hier is een klein voorbeeld.

pinMode(StatusButtonPin_1, INPUT_PULLUP);
pinMode(StatusLedPin_1, OUTPUT);

pinMode(StatusButtonPin_2, INPUT_PULLUP);
pinMode(StatusLedPin_2, OUTPUT);

De lusfunctie heeft één codeblok, deze moet worden gedupliceerd en de _1 in _2 worden gewijzigd. Zoek en bedrieg nu de rest, wees voorzichtig bij het compileren, zodat je weet dat je niets kapot hebt gemaakt en bewaar die kopie zodat je een back-up kunt maken wanneer/als je dat wel doet. Laat me weten hoe het met je gaat.

 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
(@mevero)
Member
Joined: 3 years ago
Posts: 22
 

@zander  Thanks for your help. I try to use your example. I enclosed the program so far and a screen print what happens when I try to upload. I hope you see and like my trying.

Trying 1

   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7297
 

@mevero Je hebt zoveel fundamentele fouten, ik denk dat dit te veel voor je is. Ik heb u uiterst gedetailleerde instructies gegeven en u hebt de werkzaamheden niet kunnen uitvoeren.
Ik denk dat je de basisprincipes van programmeren moet leren, en ook hoe de Arduino IDE in het bijzonder gecodeerd moet worden.
Veel succes, ik heb je het antwoord gegeven, maar je hebt meer tijd nodig om ervan te profiteren.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7297
 

@mevero Now you can do the translating.

The first error you got was 

/private/var/folders/r5/fjhtttf952x9mvr0j_pdkt9h0000gn/T/.arduinoIDE-unsaved2024426-42433-18tpm7d.l48p/sketch_may26a/sketch_may26a.ino:11:8: error: expected constructor, destructor, or type conversion before '(' token
pinMode(StatusButtonPin_1, INPUT_PULLUP);

The reason is you failed to follow instructions. I said simply rename any variable that is related to the button or led so that it ends in _1. Then compile, it should be clean. What you did was remove correct code and add incorrect code and did change some of the things I told you about.

One thing I did do that I didn't mention was get rid of the defines in favour of const int but that changes nothing. Here is the first part of the sketch. Tell me what you think is different, what is wrong with yours, and why. Then correct it, and now change the other things that are obvious.

The first picture is my code where I added _1 to all the variables to do with the button and led. I then duplicated those to create the _2 copies. NOTE I have not assigned pin numbers to the two new pin variables, you must do that.

The second picture is your code.

Lines 11, 12, 13, 14 each have 2 errors. Lines 16, 17, 18, 19 each have 2 errors. Lines 24 and 25 need a pin number in place of the ??

Screenshot 2024 05 26 at 09.26.13
Screenshot 2024 05 26 at 09.35.50

 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Page 8 / 10