Code: [Local Link Removed for Guests]
' Receptor
OPTION.MAC "AA:BB:CC:DD:EE:F1"
espnow.begin
onEspNowMsg message
wait
message:
print "Received message: " + espnow.read$
return
Code: [Local Link Removed for Guests]
' Emisor
espnow.begin
espnow.add_peer "AA:BB:CC:DD:EE:F1"
timer0 10000, sendMessage
wait
END
sendMessage:
msg$ = date$ + " " + time$ + " " + str$(rnd(1001))
print "Sent message: " + msg$
espnow.write msg$
return
As always, I marvel at how Annex can achieve so much in so few lines. It works perfectly. For hours and days.
But if I try to do the same with an ESP32, on the receiving side I get the warning through the serial port:
Switched to AP Mode Vozpornoche
IP address: 192.168.4.1
Number of program lines: 9
Basic File Loaded: /receptor.bas
Program Running
Invalid MAC address line 2
Program Ended
My questions: Does the OPTION.MAC instruction not work on the ESP32?
Is it written differently than on the ESP8266?