tag archives: code

CR1 script to log balance measurements with a campbell scientific data logger

[posted: ]  [0 comments]

here’s a script to record time-series of balance measurements (weight data) using a Campbell Scientific CR1000 datalogger and a balance with an RS232 serial interface.
we have been using two dedicated scripts which vary slightly to work with two different balance models, the Mettler-Toledo MS8001TS (polled mode; should work with all current Mettler-Toledo balances based on MT-SICS) and the Kern DE35K0.5D1 (set to continuous output).

download: (.cr1 files, saved as .txt)
CR1000 script to log output from a Mettler-Toledo MS8001TS balance
CR1000 script to log output from a Kern DE35K0.5D balance1
CR1000 script to log output from four Kern DE35K0.5D balance1

if you just want to have a look at the code, the CR1 scripts are included in text form at the end of this post.

1note that, as it turns out, the strain gauge loadcell measuring system of the Kern DE35K0.5D balance makes it unsuitable for longer term measurements. to get an idea of the drift effect resulting from a continuous load on these balances, here’s a figure from a test run with constant weights: [more...]

[categories: computers & technology, science] [tags: , , ]

working example form and graph: how to collect user input and present it in a graph on static websites, using google forms

[posted: ]  [0 comments]

how to collect user input and present it in a graph on static websites, using google forms here is a working example of a google form and chart embedded statically into a web page.
you may also be interested in a truly static version and/or the underlying data in this spreadsheet on google docs.
[more...]

[category: computers & technology] [tags: , , ]

how to collect user input and present it in a graph on static websites, using google forms

[posted: ]  [0 comments]

how to collect user input and present it in a graph on static websites, using google forms the problem: for a small web project that is going to run on a server with very restricted functionality (due to safety concerns), we wanted to include a web form where visitors can submit values. these values should then be presented in a graph, showing all submitted values and highlighting the latest addition.

the solution: after some digging, i found a way to do all of that using google forms/spreadsheets, which offers user input, a simple spreadsheet-based database, as well as dynamic image creation.
check out the working example page and the underlying spreadsheet, and continue reading for a step-by-step tutorial on how to create a web form that plugs into an automatically refreshing graph/chart using very basic means, and how to implement it all using just two static web pages, a google form, and a google spreadsheet. [more...]

[category: computers & technology] [tags: , , ]

how to embed google+ photospheres in your wordpress blog using shortcodes

[posted: ]  [9 comments]

update: google has published a new, official way to publish photospheres on your website, which still works (in contrast to the below, outdated method).

if you’ve been following the feature additions to android over the past few months, you’ve probably heard of photospheres: they’re google streetview-like interactive 360 degree panoramas that you can easily record with your smartphone running android jellybean 4.2+.
now, google has finally provided us with a way to embed photo spheres from google+ on other websites, including your self-hosted wordpress blog!

stunning views from seegrube, innsbruck

here’s a little function for your wordpress theme’s functions.php, which will enable the shortcodes [photosphere URL] and [ps URL]: [more...]

how to print a timestamp with periodic output from WinWedge

[posted: ]  [0 comments]

how to print a timestamp with periodic output from WinWedge WinWedge is a simple tool to obtain periodic readouts through a serial RS-232 or COM interface (e.g. from an analytical balance). unfortunately, though, obtaining a timestamp for every data point is not as intuitive as it could be.
here’s how you can automatically add a timestamp to your periodic output with WinWedge (tested with WinWedge32 Std. V3.0).

let’s assume that you’ve already configured the basic communication (“Port” – “Settings”) and timer settings (“Define” – “Serial Output Strings” > “Interval (ms)” and “Timer Controlled Output String”). [more...]

[categories: computers & technology, science] [tags: , ]

typo3: how to solve problems with https_enforcer and htaccess redirect loops

[posted: ]  [0 comments]

i’ve had some problems getting https_enforcer to work in a typo3 instance with realurl. for some reason i, every attempt at opening a page with the “enforce https” option activated, resulted in a redirect loop error.

how to solve problems with https_enforcer and htaccess forwarding multiple domains to one

as it turns out, one of the issues was an old htaccess redirect rule (not shown here) that was supposed to force visitors from multiple domain names to the main domain name.

here’s the combination of all related the settings that works for me: [more...]

[category: computers & technology] [tags: , ]

how to: add individual css classes to sidebar widgets in wordpress using widget logic

[posted: ]  [0 comments]

how to: add individual css classes to sidebar widgets in wordpress using widget logic there are some wordpress themes which, for some reason, remove the individual widget wrap css-classes, and just add one generic class to all the widgets, e.g.
<div class="widgetwrap"> ... </div>

this is a real pain if you want to change the appearance of just one specific widget in your sidebar.
at the same time, widget logic is (1) a very powerful widget plugin, and (2) known to have incompatibilities with some other widget plugins (or is it the other way round?).

to solve this problem while keeping widget logic, i wrote a little script and thought i’d share.

[more...]