Category: Programming


I don’t normally support things on Kickstarter as I’m scared that the project will fail and I’ll loose my money ( I have seen it happen,) however I friend on mine told me about the project and for the first time I jumped on board.

The project in question is the Robotics Construction Kit by Geeekclub https://www.kickstarter.com/projects/geeekclub/geeek-club-diy-robotics-kit?ref=user_menu

The project was successfully funded, but there was an issue with the email (i had the wrong email in my kickstarter account.) With the help of my friend acting as middleman we managed to get the email sorted out and now I am 1220th inline to get my kit.

67609995bbe4a34a24721d74d57f8fed_original

Complete early bird kit images borrowed from the kickstarter page.

I didn’t really need all the tools but, for once I had some spare pennies and decided to invest in the kit.

Feeling good about my investment (and board because this is written in the middle of the 2020 Covid19 Global Pandemic) I started to explore kickstarter to see what else is there.

Currently I have invested in the M5Stack range of products which includes 1515 aluminium extrusion https://m5stack.com/collections/m5-aluminium and the Totem Makers system of plastic extrusion https://totemmaker.net which are interesting and cross compatible due to the use of M3 Fittings used by both.

Going back onto the Kickstarter site I went looking for other project of interest. While searching I came across another successfully funded project called NanoBeam. https://www.nanobeam.us NanoBeam is a system of tiny aluminium extrusion items with a profile of only 5mm X 5mm

IMG_4018

NanoBeam components (image borrowed from website.

Unlike Totemmaker and M5Stack, the parts are too small to use M3 fittings and instead use M1 size fittings. I can’t wait until I have some money to invest in a kit to see what I can do with the kit.

What else can I find?

Next is the Makeblock Platform
3ffcb53935017a6c6203d868d9b4a548_original
https://www.kickstarter.com/projects/1397854503/makeblock-next-generation-of-construct-platform/description It is another construction system but I cant tell if the kickstarter was successful or not.

Anything Else?

Next up is MOSS https://www.modrobotics.com/moss/
MOSS is a magnetic screw less construction kit but looking at the prices’ is out of my budget range.

Multiplo https://www.modrobotics.com/moss/ Another Robot construction system
e8a3ff7a7abf75ca9500073f4514362f_original

I am sure there are loads of others worth mentioning but this post has already taken me nearly an hour to write and my own products that need finishing.

If you found this post useful, please drop me a message to say thanks.

First up a disclaimer.

This won’t be updated much or a regular series as not much is known about the graphics functions in UIFlow. However, the following steps is how I get images on to the M5Stack using UIFlow.

OK here is what worked for me.

Download and install G.I.M.P G.I.M.P.org

create a file 80x160px (for M5Stick) ,
Add graphics,
Goto Image>mode>Indexed,
Make sure ONLY “use web optimised palette” and “Remove unused and duplicate colours from palette”.
Goto File>Export As,
save the file as .jpg (filename must only have 7 letters),
Set “Quality” to 90% you may have to reduce this depending on image.
Click on ALL the boxes to remove the X
Click on advanced,
Unselect everything by clicking on the X to remove them,
Set smoothing to 0,
Set Subsampling to 4.2.0
Set DCT to integra and hit save.
Open UIFlow,
Click on the manager icon to upload the image to the M5Stick C,
Drag an image element to the screen and click on it to set the image to the one you uploaded, and then click the > “Play” icon to check the image.

If this helps you, please let me know.

Finally found time to work on some of my #M5Stack projects.

I2C Servo Unit.

The I2C Servo Unit is almost a clone of M5Stacks official Module but instead of it being a stackable module, the I2C Servo Unit is a plugin unit that connects to the M5Stack I2C port.

module_servo_01

The above image is how the official one looks. I have not been able to purchase one and as the circuit and code is open source, I built my own.

I2Cservo

Sorry for the bad picture, the human holding the camera wasn’t stable.

I designed this using through hole components as a beginners kits for people wanting to learn how to solder a basic kit. This is the Revision 3 board and unfortunately has some mistakes (the data connector that is on the underside, should be on top!) it works and I’m powering it from two 18650 cells rescued from an old laptop battery.

 

My next project I have working is Photography turntable. The #M5Stack is used to drive the stepper motor and trigger the camera.

Here I am using a cheep cable remote trigger connected to the M5Stack Relay module. the screw in the trigger is a temp conductive bridge as the first two contacts need to be together in order to fire the Sony SLT A58.

This all was coded using M5Stack UIFlow programming environment and the code is as follows

Screenshot 2019-06-22 at 14.31.24

Yes it is that simple!

 

I have been looking around for a new headunit for my car and not been able to find one that does what I need. Having Raspberry Pi’s and a Prusa i3 printer sitting around, I thought it should try building one.

For this I am using  Raspberry pi2 (yeh, old hat now) and a 7″ Waveshare touchscreen with 1024×600 resolution.

After 2 days of updates I have just found out that my distro is out of date!

Oh well time to upgrade.

XMOS startkit Step 1

So after spending all day yelling at my XMOS startkit I finally got a basic hello world flashing led code to work. This code flash’s one of the two leds closest to the ram.

#include <xs1.h>
#include <timer.h>

port p = XS1_PORT_1D;
int main() {
 while (1) {
     p <: 0;
delay_milliseconds(200);
p <: 1;
delay_milliseconds(200);
}
}

So how does all this work?

First up we need to reference the required header files. The most important one is xs1.h contains the core functions for working with XMOS Chips. We add this by adding the line

#include <xs1.h>

This contains the port definitions so that our programs will know what port p = XS1_PORT_1D means.

The second one required for the program to work is

#include <timer.h>

This allows us to use the timing function of the chip (I may be mistaken here in that it could actually be a core “C” header!) and allows the code to understand what delay_milliseconds(200); means.

After we have those two lines we need to define which pin our LED is connected to. According to the Startkits hardware manual the two of the leds are labelled D1 & D2 and are accessed through ports 1A and 1D (see page 10/17) and to access them we need to add

port p = XS1_PORT_1D

By changing port p = XS1_PORT_1D; to port p = XS1_PORT_1A; you can change between one of the two leds that are located next to the 256KB SPI flash chip. According to the schematic diagram in the hand book, these leds are connected between the chips pin and ground making them active low. To turn them on the chip needs to supply power to the led and this is done with the following.

p <: 1;

If you noticed the code, I put this line near the end, this is because on each cycle the following

 while (1) {
     p <: 0;

Checks to see if the if the variable “p” high (1), if it is, the pin is set low (0) by the following line. then after a delay, if the variable “p” is high the it will be set low and XS1_PORT_1D will be switched off.

If I understand myself, then all this will make sense and you (the reader) should be able to follow this.

Well I have had enough programming for today so time to pack up.

Raspberrypi+lcd proc working.

So after three hours of shouting and swearing at my Raspberry Pi B I finally had LCDproc working on it.

The problem in the end came down to ttyS0 not existing. Because the MX232 runs via USB, no matter what I tried to change it to (RPI uses ttyUSB0) it wouldn’t take. In the end I remembered so arcane command and typed

sudo ln ttyUSB0 ttyS0 to create the node and link it to ttyUSB0.

Once that was done the lcd jumped to life! if this hold after a restart I don’t know but at least it’s working now!

Well I am surprised, this has to be the first time I have ever been picked in a draw.

My Xmos Startkit arrived today (12-December-2013) I have the software installed on OSX 10.9 and working but now too tired to even play with the demo’s!

Thank you Xmos.com

Arduino Mega ADK and Sony Erricson Xperia Mini Pro X17i works (well sort off!)

Well After all the banging, thumping and moaning I have managed to get the Xperia Mini Pro X17i to communicate with the Arduino Mega ADK!

First was patching of the Arduino code aka firmware, that took a lot of work mostly due to running the 1.0.1 version of the Arduino  programming environment. After editing loads of it then replacing the Google ADK files with the ones from http://www.circuitsathome.com/category/mcu/arduino/usb-shield I got the code to compile and upload but still couldn’t get the Xperia Mini Pro X17i to recognize it (well the phone charged but that’s it) I hit on an idea of using the Xperia live dock!
Powering everything up (mega using separate adapter) I connected the phone to the dock and “Unsupported accessory” message popped up, Yes its at least reading it in the liveware manager app.  After looking back through the arduino code I found the answer in AndroidAccessory.cpp

The following lines

#define USB_ACCESSORY_VENDOR_ID         0x18D1
#define USB_ACCESSORY_PRODUCT_ID        0x2D00

Needed to be changed but to what I hear you ask? The VENDOR_ID and PRODUCT_ID are incorrect (this is stated but I just ignored it causing some of the grief) After a bit of google I worked out how to get my ID code in Windows 7.

Once I had my codes I changed the lines to this

#define USB_ACCESSORY_VENDOR_ID         0x0FCE
#define USB_ACCESSORY_PRODUCT_ID        0x0166

Recompiled and now it’s recognized as Supported Hardware! (This is just for the Sony Erricson Xperia Mini Pro X17i)

Now I need to learn how to modify the Android demo app to make it work!

Note to get the demokit app to work I had to edit the manifest file (see previous file) which solved the errors then I cheated and just suppressed/ignored the warnings and it compiled, unfortunately there a bug in it which is preventing the app from displaying properly or recognizing the board!

I hope this information will be helpfull to you out there also venturing into this field.

つづく

I have been trying to get into this android hardware development and like many I have been suffering from the
R cannot be resolved to a variable

After finding no luck with the solutions on the web I started pooking around the web.
In the end I found it was the following that caused the issue

All I did was delete
android:theme=”@android:style/Theme.Holo”

Run Project>Clean followed by refresh and that got rid of the R cannot be resolved to a variable issue.
Now I just need to solve the
The import android.text.SpannableStringBuilder is never used
Issue’s.

Well Been along time Since I have remembered to update this, so……

1st After 3 years I had to dump my bicycle and buy a new one,after keeping to the sub £200 market I finally had enough (probably spent the same and what I initially paid for the old bike in repairs!)

My new bike is a Forme Elements ( well with one or 2 alterations thanks to Ralphs cycles of Taunton)
Forme Element
And so far I’m quite happy with it but for the problem that my knees are now hurting due to inflamation of the joint (nothing to do with the new bike, just coincidence that it flared up with the new bike).
The bike cost £499 but I got it for £399. It is incredibly light weight for its size and came with a lifetimes free servicing, sweet, Just hope I last for a long time.

2nd – Wargames

Well Got board and decided to start another Warhammer 40K army so Now I Have 3(4) 40K armies !
World Eaters (Chaos Space marines),
Forces of Ultramar,
Eldar,
Add to that 2 Warhammer fantasy Armies
Dwarf’s,
High elves,
And a whole host of other models from various companies (Pegasus, Sodapop miniatures).
I should really be out painting *groan*.

3rd electronics
After looking for a Cheep Internet tablet I went for the Superpad III, this is an android powered Chinese tablet in the sub £150 market and so far I’m happy with it.
I’m trying to get into electronics and wanted an Oscilloscope Seeing the Arm DSO quad from seed studio really I cheep I ordered one unfortunately It’s stuck @ Chinese customs and my supplier is doing everything to solve this problem (Thank you for you help!).
I’ve also invested in an Arduino Uno with the intention of Home automation however, I came across a Netduino Plus
Netduino Plus
which has a built in ethernet shield for the same price, I just hope I keep remember how to program it. After having had the ceeling in my room replace due to asbestos I now have LED lighting in the room making the whole automation process simpler.

I just need to remember to update this and learn how to use all my new toys.