stackmad
Re:Boden – Native mobile cross-platform applications
on Thursday May 30, 2019 @01:40PM (#20053866)
Author of boden here: We have since moved away from a self written smart pointer and replaced as much as possible with standard C++ classes ( shared_ptr, weak_ptr, std::string etc. )
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Wednesday January 30, 2019 @08:56AM (#19035016)
Actually its 9 plants ;)
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @01:20PM (#19000699)
Yeah, you have to use IOKit, which hidapi wraps.
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @12:57PM (#19000461)
LOL
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @10:53AM (#18998975)
:) But the CO2 measurement part honestly came first.
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @10:53AM (#18998967)
Sure, but I wanted to see the data over time. And I was bored :)
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @09:13AM (#18997971)
Yeah, its quite ok.
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @08:50AM (#18997821)
Totally true, but my soldering iron is in the basement, so ... ;)
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @08:44AM (#18997782)
Yes, absolutely. I only have one device at the moment, but it sure would be interesting to see how fast the levels equalize between rooms
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @08:43AM (#18997773)
Yes, I agree. But this was way more fun :)
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @08:43AM (#18997771)
I guess it should match the outside air as close as possible. So around 400ppm
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @08:29AM (#18997688)
Its not that I'm afraid to die here :) Its more about improving the quality of the air. And the body is pretty bad at recognizing higher than norm CO2 level unless it gets to life threatening levels. ( https://youtu.be/1Nh_vxpycEA?t=45 )
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @08:19AM (#18997636)
Though with your steps it at least starts, but the webserver fails, and CTRL+C doesn't work ^^
* Serving Flask app "co2meter.server" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: off
INFO:werkzeug: * Running on http://127.0.0.1:1201/ (Press CTRL+C to quit)
ERROR:flask.app:Exception on / [GET]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python2.7/site-packages/co2meter/server.py", line 64, in home
data = read_logs()
File "/usr/local/lib/python2.7/site-packages/co2meter/server.py", line 236, in read_logs
with open(os.path.join('logs', name + '.csv'), 'r') as f:
IOError: [Errno 2] No such file or directory: 'logs/co2.csv'
INFO:werkzeug:127.0.0.1 - - [25/Jan/2019 14:18:23] "GET / HTTP/1.1" 500 -
INFO:werkzeug:127.0.0.1 - - [25/Jan/2019 14:18:23] "GET /favicon.ico HTTP/1.1" 404 -
^C^C^C^C
^C^C
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @08:17AM (#18997622)
That looks great as well! But for some reason the library they use (pyhidapi) would always crash on my Mac.
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @08:14AM (#18997601)
I saw some study that suggests that higher CO2 levels decrease cognitive abilities. You wont die, but I do tend to get headaches when the air gets worse.
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @08:06AM (#18997556)
It definitely shows that this is one of the cheapest meters on the market. But the values seem to be realistic, when having all windows open it shows 450-460 ppm which is at least close to the global 400ppm ( and I live next to a road in a bigger city ).
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @08:04AM (#18997540)
Yeah, I've finally managed to tweak the thermostat on the radiators and the main thermostat for the heater to where I like it :)
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @08:03AM (#18997535)
Yeah, that was pretty quickly hacked together :)
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @08:02AM (#18997529)
The device on its onscreen display shows the same steps, so I think its due to how the sensor works.
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @08:01AM (#18997521)
Depends, this was a question I tried to answer for myself with this project.
I did not easily find a good library for Python that would work on my Mac for reading the HID messages, so writing the device part in C++ was easier for me ( and an interesting excercise in c++17'ifying C code ). I thought about just having the c++ app be called from python, but wanted to try and see how hard it would be in c++ and found it extremely easy with the cpprestsdk.
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @07:58AM (#18997509)
Yes, I agree. I've already ordered a bunch of plants :) Sadly my building is quite old and ventilation is poor.
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @07:56AM (#18997501)
That looks good as well! I actually didn't know about that project. It wouldn't have worked on my specific case though since I wanted it connected to my Mac, that tool only works on Linux.
Re:Show HN: I wanted to measure CO2 in my office, so I build a C++ Web...
on Friday January 25, 2019 @07:55AM (#18997492)
You can only put link + title on here. And the story is rather boring :) I wanted to measure it, I got a device from amazon, found a python script to read the data, the dependencies (pyhidapi) always sigfaulted, so I wrote my own :)
Show HN: I wanted to measure CO2 in my office, so I build a C++ WebServer/App
Re:Pijul: distributed version control system based on a sound theory o...
on Tuesday December 11, 2018 @08:23AM (#18655124)
Is there a TL;DR version of their "theory of patches" ?
Re:Ask HN: Which tool for generating aesthetically pleasing C++ refere...
on Friday September 28, 2018 @03:57AM (#18091694)
I'd recommend having a look at sphinx together with exhale https://exhale.readthedocs.io/en/latest/
Re:CppCon 2018: Kate Gregory “Simplicity: Not Just for Beginners”
on Thursday September 27, 2018 @04:06PM (#18088078)
More people should see this!