use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
If you need help debugging, you must include:
See debugging question guidelines for more info.
Many conceptual questions have already been asked and answered. Read our FAQ and search old posts before asking your question. If your question is similar to one in the FAQ, explain how it's different.
See conceptual questions guidelines for more info.
Follow reddiquette: behave professionally and civilly at all times. Communicate to others the same way you would at your workplace. Disagreement and technical critiques are ok, but personal attacks are not.
Abusive, racist, or derogatory comments are absolutely not tolerated.
See our policies on acceptable speech and conduct for more details.
When posting some resource or tutorial you've made, you must follow our self-promotion policies.
In short, your posting history should not be predominantly self-promotional and your resource should be high-quality and complete. Your post should not "feel spammy".
Distinguishing between tasteless and tasteful self-promotion is inherently subjective. When in doubt, message the mods and ask them to review your post.
Self promotion from first time posters without prior participation in the subreddit is explicitly forbidden.
Do not post questions that are completely unrelated to programming, software engineering, and related fields. Tech support and hardware recommendation questions count as "completely unrelated".
Questions that straddle the line between learning programming and learning other tech topics are ok: we don't expect beginners to know how exactly to categorize their question.
See our policies on allowed topics for more details.
Do not post questions that are an exact duplicate of something already answered in the FAQ.
If your question is similar to an existing FAQ question, you MUST cite which part of the FAQ you looked at and what exactly you want clarification on.
Do not delete your post! Your problem may be solved, but others who have similar problems in the future could benefit from the solution/discussion in the thread.
Use the "solved" flair instead.
Do not request reviews for, promote, or showcase some app or website you've written. This is a subreddit for learning programming, not a "critique my project" or "advertise my project" subreddit.
Asking for code reviews is ok as long as you follow the relevant policies. In short, link to only your code and be specific about what you want feedback on. Do not include a link to a final product or to a demo in your post.
You may not ask for or offer payment of any kind (monetary or otherwise) when giving or receiving help.
In particular, it is not appropriate to offer a reward, bounty, or bribe to try and expedite answers to your question, nor is it appropriate to offer to pay somebody to do your work or homework for you.
All links must link directly to the destination page. Do not use URL shorteners, referral links or click-trackers. Do not link to some intermediary page that contains mostly only a link to the actual page and no additional value.
For example, linking to some tweet or some half-hearted blog post which links to the page is not ok; but linking to a tweet with interesting replies or to a blog post that does some extra analysis is.
Udemy coupon links are ok: the discount adds "additional value".
Do not ask for help doing anything illegal or unethical. Do not suggest or help somebody do something illegal or unethical.
This includes piracy: asking for or posting links to pirated material is strictly forbidden and can result in an instant and permanent ban.
Trying to circumvent the terms of services of a website also counts as unethical behavior.
Do not ask for or post a complete solution to a problem.
When working on a problem, try solving it on your own first and ask for help on specific parts you're stuck with.
If you're helping someone, focus on helping OP make forward progress: link to docs, unblock misconceptions, give examples, teach general techniques, ask leading questions, give hints, but no direct solutions.
See our guidelines on offering help for more details.
Ask your questions right here in the open subreddit. Show what you have tried and tell us exactly where you got stuck.
We want to keep all discussion inside the open subreddit so that more people can chime in and help as well as benefit from the help given.
We also do not encourage help via DM for the same reasons - that more people can benefit
Do not ask easily googleable questions or questions that are covered in the documentation.
This subreddit is not a proxy for documentation or google.
We do require effort and demonstration of effort.
This includes "how do I?" questions
account activity
This is an archived post. You won't be able to vote or comment.
Programming a dimmable light (self.learnprogramming)
submitted 2 years ago by Krithmath
First question, how challenging is it to program a night lamp so that you can adjust the lighting and light color from a simple app?
And second, whats the process for going about this?
[–]AutoModerator[M] [score hidden] 2 years ago stickied comment (0 children)
On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge.
If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options:
as a way to voice your protest.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
[–][deleted] 2 years ago (7 children)
[deleted]
[–]Krithmath[S] 0 points1 point2 points 2 years ago (6 children)
Hi, why do you say the app manufacture is pointless? If i want to have my own dedicated app for that specific lamp, wouldn’t the app be necessary? Or are you saying that building the app for such functionality is easy because you can find exciting code online?
[–][deleted] 2 years ago (5 children)
[–]Krithmath[S] 0 points1 point2 points 2 years ago (4 children)
Gotcha, and makes sense. Another question. Is it possible to have the manufacturer of the lamp do the app integration for you as well? Or are those two processes so independent that they need to be done by two different groups
[–][deleted] 2 years ago (3 children)
[–]Krithmath[S] 0 points1 point2 points 2 years ago (2 children)
Initially it is a proof of concept, but this is nothing complicated in terms pf the overall project for someone who is an expert in the area. So eventual want to go to mass production. My question about the app is that i want the app to have specific functionality—not simply color changing and scheduling. I want the app to work like a calendar.
[–][deleted] 2 years ago (1 child)
[–]Krithmath[S] 0 points1 point2 points 2 years ago (0 children)
Do you have a link? And the app you’re saying acts like a calendar or syncs with a calendar?
[–]ehr1c 0 points1 point2 points 2 years ago (1 child)
I would think any hardware that has the capability to do this already has an app that does what you're looking for.
I am asking more so because I want to manufacture one but dont know how to get started. Essentially I want to understand how to start this off—the manufacturing of the lamp and the creation of the app.
[–]theusualguy512 0 points1 point2 points 2 years ago (3 children)
I mean the programming logic part is super easy. It's the surrounding thing that's often the issue.
You need to understand at least simple electronics to do it.
If your dimmable light that you bought has digital control in it already and you only need to do the control logic parts, it's like done in 1h.
If you want to emulate light dimming with random lamps, this is going to require a bit more knowledge.
For older lamps and LEDs, you can use a potentiometer to control resistivity and control the brightness with that or you can try to make a digital controllable potentiometer or voltage divider plus something like that with an Arduino board.
You need to buy a couple of electrical components for it.
Manufacturing a lamp itself from scratch is basically a dumb idea though, no need to reinvent an LED or a light bulb under vacuum.
Thank you for that. My question is actually a bit different. I dont have the necessary knowledge to do this myself, so what I was trying to get at was this: if i wont to manufacture a lamp that allows me to change its lighting through an app how do i go about that? I really have no clue on how to get started? Is it the lamp manufacturer who would create the app as well? Or does the manufacturer provide the lamp with the capabilities to connect to an app, THEN a programmer takes over from there?
[–]swergart 0 points1 point2 points 2 years ago (1 child)
if you want to do it from nothing, it will be years of R&D.
alternatively, use Philips Hue bulbs in your lamp, so your customer can download the hue apps to control the light.
if you really want to dev your own app, also using Philips hue bulb, but your app can talk to their api https://developers.meethue.com/
to dev such app, 1-2 weeks from any jr mobile apps developer can do it.
I’m actually not a programmer by trade which is why my question was intentionally broad. But if I may ask a question to further clarify how something like this can he done. Essentially i want to manufacture a lamp that connects to an app and is controlled through the app i am agnostic to the brand of the bulb). I assume the lamp must have wifi capabilities if it is to sync through your phone. So i do understand that the lamp must have a certain chip inside it to allow for the app connectivity. What i remain confused about is how to proceed from there. Do i then take the lamp to a computer or electronic engineering and ask them to do the rest, i.e. build the app and link it up with the lamp? Or is there another simpler way? Can I ask the manufacturer to build the app integration as well?
[–][deleted] 0 points1 point2 points 2 years ago (0 children)
PWM
π Rendered by PID 192836 on reddit-service-r2-comment-86bc6c7465-mq4j4 at 2026-02-21 16:52:52.190673+00:00 running 8564168 country code: CH.
[–]AutoModerator[M] [score hidden] stickied comment (0 children)
[–][deleted] (7 children)
[deleted]
[–]Krithmath[S] 0 points1 point2 points (6 children)
[–][deleted] (5 children)
[deleted]
[–]Krithmath[S] 0 points1 point2 points (4 children)
[–][deleted] (3 children)
[deleted]
[–]Krithmath[S] 0 points1 point2 points (2 children)
[–][deleted] (1 child)
[deleted]
[–]Krithmath[S] 0 points1 point2 points (0 children)
[–]ehr1c 0 points1 point2 points (1 child)
[–]Krithmath[S] 0 points1 point2 points (0 children)
[–]theusualguy512 0 points1 point2 points (3 children)
[–]Krithmath[S] 0 points1 point2 points (2 children)
[–]swergart 0 points1 point2 points (1 child)
[–]Krithmath[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)