Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

151
Vistas
How can I let a c++ parameter decide what the HTML of the webpage will look like?

I'm working on a project in which I'm using a Walabot (a radar sensor) in c++. With this sensor I can detect if I wave my hand in front of the sensor. I'm also doing other stuff ofcourse with the sensor but that doesn't matter for this, but I need a webpage where I can show different things and I want to be able to 'swipe' in between them. I can detect the swipes in my c++ code but how do I translate this to HTML or javascript? The swipe can be made into a boolean or just a simple integer with the number showing which page I want to show.

In short: I want to pass an integer or boolean from c++ code to HTML/javascript and if that value changes it has to reflect aswell in the html, it can't be a static thing that only gets initialised in the beginning.

I saw something about nodejs but can't really see how that is supposed to make the value obtainable by the HTML. REST seems like a possibility too.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

In your c++ program, that's responsible for reading the radar output, you probably have a loop that constantly reads values from the radar. Add a timer and choose a time interval. In the loop, if the timer has reached the time interval, make it update a file with a label, telling you what event occurred most recently, e.g. a swipe, or if no even occurred.

In you JavaScript, make a loop that reads that file with the same time interval as it's updated by the radar program. Then, if the label in the file corresponds to an event, make the JavaScript take the appropriate action.

You could update the content of your page with functions like document.getElementById(), removeChild(), document.createElement(), and appendChild().

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda