These are chat archives for esp8266/Arduino

5th
Mar 2017
DRSolomon
@DRSolomon
Mar 05 2017 09:47

Greetings all,
I'm having a little bit of a problem and don't understand why it wont work - I trust someone can shed some light on getting this to work please.

IDE: 1.8.1
Device: ESP12E
Serial interface: ch340 /ftdi (tried both)

code:

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
Serial.swap(); //just testing if I can flip back and forth first
}

void loop() {
  // put your main code here, to run repeatedly:
while(true){
Serial.println("test");
delay(1000);
//Serial.swap(); //just testing if I can flip back and forth first
//delay(1000); //maybe should not use delay? block interrupts?
//Serial.swap();
}
}

Output on serial (pins 13 and 15) = NADA
Original serial port (pins 1 and 3) as follows:

 ets Jan  8 2013,rst cause:1, boot mode:(3,6)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v09f0c112
~ld
þ

Very frustrating!
What I'm wanting to do is swap the serial over to pins 13 and 15 to avoid the garbage on startup which is giving me grief.
Solution/working examples of this HIGHLY appreciated.

Basically it seem that the code wont run on the esp12e, yet if I remove the Serial.swap() it runs perfectly :worried:
Akash Ashok
@thehellmaker
Mar 05 2017 10:15
Hey Guys, I see from http://www.esp8266.com/wiki/lib/exe/detail.php?id=esp8266_gpio_pin_allocations&media=pin_functions.png that DEEP_SLEEP mode DPIO6 to 11 are usable. what the use of GPIO in deep sleep mode anyways?
probonopd
@probonopd
Mar 05 2017 14:05
@me-no-dev @Makuna https://github.com/probonopd/WirelessPrinting/ is what I am working on - sending G-Code to a 3D printer from Cura. And have it cached on a SD card, so that the computer isn't needed while it is printing.
I had to try 3 SD cards and only 1 is (sometimes) working
probonopd
@probonopd
Mar 05 2017 14:16
Stavros Korokithakis
@skorokithakis
Mar 05 2017 16:40
hey everyone
how good is the ESP's random number generator?
is it really random or am i going to get hacked by some chinese guy?
Me No Dev
@me-no-dev
Mar 05 2017 16:42
it is really random or as random as possible (it way more random than some other randoms) but keep in mind that there is no such thing as "random" in computers
@probonopd I'll get a lib ready for testing soon and you should be able to tell if it will work (it will)
Stavros Korokithakis
@skorokithakis
Mar 05 2017 16:44
@me-no-dev is it okay for cryptography? do you know what the entropy sources are?
Me No Dev
@me-no-dev
Mar 05 2017 16:45
I do not know the source, it's prolly more than one ;) it's a hardware register that we just read, and every time you read it it's different. It's more then good enough for cryptography
Stavros Korokithakis
@skorokithakis
Mar 05 2017 16:51
cool cool, thank you
Michael Miller
@Makuna
Mar 05 2017 18:17
I just want point out, unless its called out as a crypto random then its not crypto random. It maybe good enough for a home project but putting into a secure system where your job is on the line, I would not.
probonopd
@probonopd
Mar 05 2017 22:00
thanks @me-no-dev