Brian Sherwin

Brian Sherwin bsherwin

Niner since 2006

Entries

Sessions

Comments

  • Continuous Deployment to an Azure Web App Deployment Slot

    @sreekumar menon:behind the scenes it's an IP swap, so it is still there...it's pointing to your previous version of the code. If something goes bad, you can swap it back in. When you are ready, deploy your next version of code over it and your ready to swap again. So it looks kind of like this...

    Prod = v1; Staging = v2...swap...Prod =v2; Staging = v1.

    Deploy v3 to Staging

    Prod = v2; Staging = v3...swap...Prod=v3; Staging = v2.

    Deploy v4 to Staging

    Prod = v3; Staging = v4...swap...Prod = v4; Staging = v3...(oops, deployed bug)...swap...Prod = v3; Staging = v4 

  • The Maker Show: Episode 2 - Blinking LED...Now What?

    Nothing special about the 50k resistor (except it was what I had on hand when shooting the video). The analogRead will give you a values between 0 and 1023. This represents the a value from 0 to 5v...so it's not entirely arbitrary. When the voltage is 0, the value is 0. When the voltage is 5v, you will have 1023. If you incorrectly connected this to a 3.3v pin, you would only get up to a value around 670 - 680.

    On the other hand, analogWrite only takes values between 0 and 255. 0 being always off and 255 being always on. Otherwise it is a pulse is at a regular frequency (depending on the speed of the pin). This is PWM. To be clear, the LED is digital. Connecting it to a PWM port allows you to blink it on and off in a frequency that is more off than on (less than 128) or more on than off (greater than 128) and allowing perception to take over on the "brightness" of the LED.

    A great place to read more about potentiometers and Arduino is here: https://www.arduino.cc/en/Tutorial/AnalogInput