Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8499641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:43:21+00:00 2026-06-11T00:43:21+00:00

I have a project that I am putting together it is working well so

  • 0

I have a project that I am putting together it is working well so far.

But I am a bit lost on where to start python wise. The basics of the projects are A lighting system that is controlled by an Arduino over a wireless link (Already setup) that receives commands from a python program through serial over a xBee network (This part is coded and working). I want the project controllable over the internet.

I was thinking about running it so that the python program runs an http server which is fairly easy to setup.

Here is where I am having trouble as I have not played with python in the past. How do I get the program to respond to request and run code depending on what was clicked on the page?

Can anyone point me in the right direction please

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T00:43:23+00:00Added an answer on June 11, 2026 at 12:43 am

    You can write a server application using a framework like Tornado that listens for messages on an arbitrary port.

    However it sounds like you want to build a web interface. For this you should just pick a web framework. My favourite micro framework is Flask. Their quickstart I just linked to shows how easy it is to get a simple site running.

    Then you would write a function for each action in the user interface. And each of those functions would be activated when the user clicks a link (or a button) that visits the associated URL.

    @app.route('/')
    def index():
        return render_template('index.html')
    
    @app.route('/dim_lights/<room>')
    def dim_lights(**kwargs):
        dim_lights_for_room(kwargs['room'])
    

    The 'index.html' template would contain links like <a href="/dim_lights/lounge">Dim the Lights in the Lounge</a>.

    Does that makes sense?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.Net project using AJAX that I am putting on a server
I have a project that compiles and runs on my system but when I
I have this Caliburn.Micro sample project I'm putting together and I am having trouble
I have a Rails 3 project that uses some java jar files. I'm putting
I have a project that may be started on local machine with ./manage.py runserver
I have a project that I have divided quite aggressively into different layers. I
I have a project that using some third-party libraries. My questions is how to
I have a project that is displaying 16px text font at 0.5ems links on
I have a project that's been changed and modified in bits and pieces over
I have a project that I've added to my Jenkins server. The project includes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.