Hot answers tagged

2

There are some issues with your code. As mentioned in my comment, Decrypt () expects the Cipher Text as input and generates the Decrypted text as an output. However, in your code you're using the Plain text (which you confusingly named "input") as an input. The correct input should be your Cipher Text (which is the output from the Encrypt () ...


2

The library that I'm using requires that I pass in 2 Boolean values into Clock.getHour(), however changing these values does not change the returned time format. You appear to be talking about the parameters here, which the second is for getting the current state of the AM/PM flag and configuration and not altering the kind of value you get in the return. ...


2

Yes. That's basically PWM through a Low Pass Filter. Use PWM to set the "duty cycle", which is the percentage of voltage. Then ise a low-pass filter (an inductor + capacitor, or resistor + capacitor) tuned to filter out the carrier frequency (should be around 500Hz if it's the same as an Arduino) to give you a voltage that is proportional to the ...


1

You don't. The PCF8574 is an IO expander. It doesn't have any provision for PWM. It's either on, or off.


1

I have solved this later I post the question.😂 The solution is using the fact which SPI on the SAMD21 will hang while W102 restarts, so I just set the SAMD21 restart immediately after the program continues. Best regards, Edwin Lu


1

I have to remove the pos++ from if statement to have digitalWrite working again according to captured temperature: if (pos < DATA_SIZE && current_time >= scen1[pos].time) { if (temperature1 < scen1[pos].temperature) { digitalWrite (relay1, HIGH); } else if (temperature1 > scen1[pos].temperature) { digitalWrite (...


1

Even if it's an old question... I suggest not rely on methods describe here. Of course you can get the SSL certificate from the browser and copy-paste it into your code. But each time the server will renews the certificate, the key change! If you have a "free" certificate, like the one from Let's Encrypt, used for example in all the shared hosting ...


Only top voted, non community-wiki answers of a minimum length are eligible