EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / LED on/off

LED on/off

|

Microcontroller › Arduino › LED on/off

  • This topic has 1 reply, 2 voices, and was last updated 7 years, 5 months ago by GANEEV SINGH.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • November 23, 2017 at 4:47 pm #4698
    Throwaway
    Participant

    This line produces PWM sine to PBA 7, how to make it turn on the LED at C13 when the sine is positive and turn it off when the sinus  is negative?

    val2 = 50 + amp / 10.0 * sin (stp * i + shift * 0.1 * 6.2831 / 360);
    January 26, 2018 at 2:16 pm #14699
    GANEEV SINGH
    Participant

    Hi Ted

    According to my knowledge, to genearte a sine wave with both positive and negative halves you will need to have another pin, apart from PWM one, which will help in changing the overall polarity. If it is so in your case, then you can easily check out for this pin's status and do the rest accordingly. This pin would either be in "set" (logic 1) state or "reset" (logic 0) state depending upon the polarity required.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Raise your hand if your car had one of these: July 8, 2025
  • Simple LED Analog Clock Idea July 8, 2025
  • Kawai KDP 80 Electronic Piano Dead July 8, 2025
  • Tektronix 2235 channel 1 trace unstable July 8, 2025
  • How to make string LEDs? July 8, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise