I’ve tried to generate the locales on my Raspberry Pi, but i ran into a problem that i was not able to solve for a few hours.
root@rpi: ~$ locale-gen
en_US.UTF-8.../usr/bin/locale-gen: line 41: 303 Killed
localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias
locale gave me another error
root@rpi: ~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
But finally i found the solution in an inconsiderable forum post. The reason for the locale-gen error is simply not enough RAM!
I’ve worked with the Java based Arduino IDE for a long time now, and always thought that i miss the comfort of vim.
But for soom reason i never searched for an alternative, but yesterday i had enough of that shit piece of software!
So i googled a bit to find an alternative and stumbled upon ino.
After a few test i must say that ino is exactly what i was looking for :–)
Take a look at the quickstart to see how easy it is.
For one of my current Flask projects i want to have a nice looking and easy to use file upload form.
That means no <input type="file"> form field where i have to select each file and the upload it on at a time.
I came across this nice tutorial for a HTML5/jquery file uploader, but the backend is written in PHP.
So I decided to try to get this working with Flask and it was easier as I supposed :–)
I do a few webprojects with Flask and I love it!
While creating a template i searched for a way to call functions from within the template, and found out that i can use a @app.context_processor decorator.
Last Tuesday I’ve nearly finished the complete code for the MateDealer project. After I’ve successfully vended a Club Mate
(that is the drink the MateDealer got it’s name from) I loged the MDB communication with my logic analyzer.
I have taken a few screenshots of the logic trace and now i will try to explain the complete procedure.
Today I want to show you how I connected our vending machine to the Arduino Mega 2560.
With a piece of stripboard i made a board that can be stacked on an Arduino like a real shield.
As you can see the board is really simple. It contain just 2 otocouplers to insulate the Arduino from the Vending machine controller, 2 resistors for the leds of each optocoupler and one as a pullup resistor.
The values of the resistors might be not perfect, but for me those values worked fine all the time. The optocpuplers are PC814 types. The can be exchanged with other types if you dont have theese available.
The board uses the UART1 for the communication. So I can use UART0 which is also used to program the Arduino to communicate with a PC. That has the nice effect that i can connect the Arduino with USB to the PC.
At the moment i work on finishing my code. As soon as i did that i will post another update with logic logs and a github link.