Another Matlab rant

Things were going so well and my opinion of matlab was beginning to change!

I was thinking how handy and good the GUI was when manipulating arrays.

All I can say is that there’s a fucking reason EVERY other programming language addresses the first element of an array as 0! It makes nested for loops to allocate both space and variables much more intuitive.

Now my code has to have some ‘orrible looking conditional statements to subtract a fucking 1.

Fuck you mathworks, sincerely a pissed off engineer.

I got some cool shit in the post today!

So today my order from Proto-Pic came!

I’ve finally got a Bus pirate. I’ve wanted one for a while but could never really justify it. It’s like the swiss army knife of electronics prototyping / debugging equipment. And by that I mean you can get along fine without it, but as soon as you have it in your pocket you’ll find something productive to do with it.

I’ve been using a PicKit serial analyser from Microchip for a about 2 years, I use the word ‘using’ loosely because in actual fact i’ve used it in maybe 4 projects? To be fair to microchip, it was kinda helpful debugging the brain fart moments that engineering seems to made up of so much, but the GUI only works in windows so that pretty much means it could shit gold and it’d still only get a 6/10 from me. (Fair one on no OSX support, but linux, cmon fellas!)
Also it just wasn’t that user friendly. At all. A good analogy would be like programming a PIC in assembly vs programming it in C… You’re both going to get somewhere, but one is going to be there at lot faster with considerably lower blood pressure.

I’ll see how it goes anyway, got the V3.6 as V4 isn’t as well supported and doesn’t do anything extra i’m interested in.

Got some probing leads with it that probably make me look as if i know what i’m doing.

A few proto capes for my beagle bone came along with some SPI based FRAM, and some wifi usb adapters that have linux kernel 3.8 support, one for the beagle and one for an embedded super duper 3D scanning bad mother fucker industrial robotic arm controller.

Leave a comment and make me feel validated about my life.

Domino.

 

 

 

 

Beaglebone SPI

What do you know, Ubuntu for beaglebone already has SPI Device Tree Overlays pre built and ready to use… along with DTO’s for pretty much everything you’d need –
-rw-r–r– 1 root root 35228 Jul 24 2008 atmel_at76c506-wpa.bin
-rw-r–r– 1 root root 31824 Jul 24 2008 atmel_at76c506.bin
-rw-r–r– 1 root root 35532 Jul 24 2008 atmel_at76c505-rfmd.bin
-rw-r–r– 1 root root 37000 Jul 24 2008 atmel_at76c505-rfmd2958.bin
-rw-r–r– 1 root root 37009 Jul 24 2008 atmel_at76c505a-rfmd2958.bin
-rw-r–r– 1 root root 35196 Jul 24 2008 atmel_at76c504c-wpa.bin
-rw-r–r– 1 root root 31748 Jul 24 2008 atmel_at76c504.bin
-rw-r–r– 1 root root 39928 Jul 24 2008 atmel_at76c504a_2958-wpa.bin
-rw-r–r– 1 root root 35180 Jul 24 2008 atmel_at76c504_2958-wpa.bin
-rw-r–r– 1 root root 37964 Jul 24 2008 atmel_at76c503-rfmd.bin
-rw-r–r– 1 root root 37804 Jul 24 2008 atmel_at76c503-rfmd-acc.bin
-rw-r–r– 1 root root 35372 Jul 24 2008 atmel_at76c503-rfmd-0.90.2-140.bin
-rw-r–r– 1 root root 28040 Jul 24 2008 atmel_at76c503-i3863.bin
-rw-r–r– 1 root root 28164 Jul 24 2008 atmel_at76c503-i3861.bin
-rw-r–r– 1 root root 35276 Jul 24 2008 atmel_at76c502-wpa.bin
-rw-r–r– 1 root root 35272 Jul 24 2008 atmel_at76c502e-wpa.bin
-rw-r–r– 1 root root 31776 Jul 24 2008 atmel_at76c502e.bin
-rw-r–r– 1 root root 35276 Jul 24 2008 atmel_at76c502d-wpa.bin
-rw-r–r– 1 root root 31764 Jul 24 2008 atmel_at76c502d.bin
-rw-r–r– 1 root root 31764 Jul 24 2008 atmel_at76c502.bin
-rw-r–r– 1 root root 35184 Jul 24 2008 atmel_at76c502_3com-wpa.bin
-rw-r–r– 1 root root 30348 Jul 24 2008 atmel_at76c502_3com.bin
lrwxrwxrwx 1 root root 23 Jan 6 2013 usb8388.bin -> libertas/usb8388_v5.bin
lrwxrwxrwx 1 root root 26 Jan 6 2013 sd8688_helper.bin -> libertas/sd8688_helper.bin
lrwxrwxrwx 1 root root 19 Jan 6 2013 sd8688.bin -> libertas/sd8688.bin
lrwxrwxrwx 1 root root 29 Jan 6 2013 sd8686_helper.bin -> libertas/sd8686_v8_helper.bin
lrwxrwxrwx 1 root root 22 Jan 6 2013 sd8686.bin -> libertas/sd8686_v8.bin
lrwxrwxrwx 1 root root 26 Jan 6 2013 sd8385_helper.bin -> libertas/sd8385_helper.bin
lrwxrwxrwx 1 root root 19 Jan 6 2013 sd8385.bin -> libertas/sd8385.bin
lrwxrwxrwx 1 root root 26 Jan 6 2013 libertas_cs_helper.fw -> libertas/cf8385_helper.bin
lrwxrwxrwx 1 root root 19 Jan 6 2013 libertas_cs.fw -> libertas/cf8385.bin
-rw-r–r– 1 root root 118888 Jan 6 2013 lbtf_usb.bin
-rw-r–r– 1 root root 2048 Jan 6 2013 rt73.bin
-rw-r–r– 1 root root 4096 Jan 6 2013 rt3071.bin
-rw-r–r– 1 root root 8192 Jan 6 2013 rt2870.bin
-rw-r–r– 1 root root 8192 Jan 6 2013 rt2860.bin
-rw-r–r– 1 root root 8192 Jan 6 2013 rt2661.bin
-rw-r–r– 1 root root 8192 Jan 6 2013 rt2561s.bin
-rw-r–r– 1 root root 8192 Jan 6 2013 rt2561.bin
lrwxrwxrwx 1 root root 10 Jan 6 2013 rt3090.bin -> rt2860.bin
lrwxrwxrwx 1 root root 10 Jan 6 2013 rt3070.bin -> rt2870.bin
-rw-r–r– 1 root root 2042 Apr 23 20:20 LICENCE.ti-connectivity
-rw-r–r– 1 root root 2115 Apr 23 20:20 LICENCE.rtlwifi_firmware.txt
-rw-r–r– 1 root root 4178 Apr 23 20:20 LICENCE.broadcom_bcm43xx
-rw-r–r– 1 root root 1946 Apr 23 20:20 LICENCE.atheros_firmware
-rw-r–r– 1 root root 51272 Apr 23 20:20 htc_9271.fw
-rw-r–r– 1 root root 13388 Apr 23 20:20 carl9170-1.fw
drwxr-xr-x 2 root root 4096 Apr 23 20:20 brcm
drwxr-xr-x 2 root root 4096 Apr 23 20:20 ti-connectivity
-rwxr-xr-x 1 root root 10796 Apr 23 20:20 am335x-pm-firmware.bin
drwxr-xr-x 2 root root 4096 Apr 23 20:35 mwl8k
drwxr-xr-x 2 root root 4096 Apr 23 20:35 libertas
drwxr-xr-x 2 root root 4096 Apr 23 20:35 rtl_nic
drwxr-xr-x 2 root root 4096 Apr 23 20:35 RTL8192SU
drwxr-xr-x 2 root root 4096 Apr 23 20:35 RTL8192E
drwxr-xr-x 2 root root 4096 Apr 23 20:35 rtlwifi
drwxr-xr-x 2 root root 4096 Apr 23 20:42 zd1211
-rw-r–r– 1 root root 2850 Apr 23 20:57 TT3201-001-01.dtbo
-rw-r–r– 1 root root 2895 Apr 23 20:57 DNIL-AMPCAPE-1-00R1.dtbo
-rw-r–r– 1 root root 57781 Apr 23 20:57 cape-universaln-00A0.dtbo
-rw-r–r– 1 root root 66220 Apr 23 20:57 cape-universal-00A0.dtbo
-rw-r–r– 1 root root 13705 Apr 23 20:57 cape-univ-emmc-00A0.dtbo
-rw-r–r– 1 root root 1721 Apr 23 20:57 cape-CBB-Serial-r01.dtbo
-rw-r–r– 1 root root 574 Apr 23 20:57 cape-bone-weather-00B0.dtbo
-rw-r–r– 1 root root 1358 Apr 23 20:57 cape-bone-weather-00A0.dtbo
-rw-r–r– 1 root root 7189 Apr 23 20:57 cape-bone-tester-00A0.dtbo
-rw-r–r– 1 root root 6275 Apr 23 20:57 cape-bone-replicape-00A3.dtbo
-rw-r–r– 1 root root 5216 Apr 23 20:57 cape-bone-replicape-00A2.dtbo
-rw-r–r– 1 root root 5663 Apr 23 20:57 cape-bone-proto-00A0.dtbo
-rw-r–r– 1 root root 977 Apr 23 20:57 cape-bone-pinmux-test-00A0.dtbo
-rw-r–r– 1 root root 2440 Apr 23 20:57 cape-bone-nixie-00A0.dtbo
-rw-r–r– 1 root root 1549 Apr 23 20:57 cape-bone-mrf24j40-00A0.dtbo
-rw-r–r– 1 root root 5972 Apr 23 20:57 cape-bone-lcd3-00A2.dtbo
-rw-r–r– 1 root root 5327 Apr 23 20:57 cape-bone-lcd3-00A0.dtbo
-rw-r–r– 1 root root 1060 Apr 23 20:57 cape-bone-iio-00A0.dtbo
-rw-r–r– 1 root root 2965 Apr 23 20:57 cape-bone-ibb-00A0.dtbo
-rw-r–r– 1 root root 4194 Apr 23 20:57 cape-bone-hexy-00A0.dtbo
-rw-r–r– 1 root root 2794 Apr 23 20:57 cape-bone-geiger-00A0.dtbo
-rw-r–r– 1 root root 1676 Apr 23 20:57 cape-bone-exptest-00A0.dtbo
-rw-r–r– 1 root root 2434 Apr 23 20:57 cape-bone-dvi-00A2.dtbo
-rw-r–r– 1 root root 3844 Apr 23 20:57 cape-bone-dvi-00A1.dtbo
-rw-r–r– 1 root root 2426 Apr 23 20:57 cape-bone-dvi-00A0.dtbo
-rw-r–r– 1 root root 2268 Apr 23 20:57 cape-boneblack-hdmin-00A0.dtbo
-rw-r–r– 1 root root 3325 Apr 23 20:57 cape-boneblack-hdmi-00A0.dtbo
-rw-r–r– 1 root root 1677 Apr 23 20:57 cape-bone-argus-00A0.dtbo
-rw-r–r– 1 root root 2948 Apr 23 20:57 cape-bone-adafruit-lcd-00A0.dtbo
-rw-r–r– 1 root root 1266 Apr 23 20:57 cape-bone-2g-emmc1.dtbo
-rw-r–r– 1 root root 10176 Apr 23 20:57 cape-bebopr-R2.dtbo
-rw-r–r– 1 root root 10024 Apr 23 20:57 cape-bebopr-ena-R2.dtbo
-rw-r–r– 1 root root 9546 Apr 23 20:57 cape-bebopr-brdg-R2.dtbo
-rw-r–r– 1 root root 1097 Apr 23 20:57 bone_pwm_P9_42-00A0.dtbo
-rw-r–r– 1 root root 1091 Apr 23 20:57 bone_pwm_P9_31-00A0.dtbo
-rw-r–r– 1 root root 1091 Apr 23 20:57 bone_pwm_P9_29-00A0.dtbo
-rw-r–r– 1 root root 1097 Apr 23 20:57 bone_pwm_P9_28-00A0.dtbo
-rw-r–r– 1 root root 1091 Apr 23 20:57 bone_pwm_P9_22-00A0.dtbo
-rw-r–r– 1 root root 1091 Apr 23 20:57 bone_pwm_P9_21-00A0.dtbo
-rw-r–r– 1 root root 1091 Apr 23 20:57 bone_pwm_P9_16-00A0.dtbo
-rw-r–r– 1 root root 1091 Apr 23 20:57 bone_pwm_P9_14-00A0.dtbo
-rw-r–r– 1 root root 1091 Apr 23 20:57 bone_pwm_P8_46-00A0.dtbo
-rw-r–r– 1 root root 1091 Apr 23 20:57 bone_pwm_P8_45-00A0.dtbo
-rw-r–r– 1 root root 1091 Apr 23 20:57 bone_pwm_P8_36-00A0.dtbo
-rw-r–r– 1 root root 1091 Apr 23 20:57 bone_pwm_P8_34-00A0.dtbo
-rw-r–r– 1 root root 1091 Apr 23 20:57 bone_pwm_P8_19-00A0.dtbo
-rw-r–r– 1 root root 1091 Apr 23 20:57 bone_pwm_P8_13-00A0.dtbo
-rw-r–r– 1 root root 861 Apr 23 20:57 BB-UART5-00A0.dtbo
-rw-r–r– 1 root root 936 Apr 23 20:57 BB-UART4-RTSCTS-00A0.dtbo
-rw-r–r– 1 root root 861 Apr 23 20:57 BB-UART4-00A0.dtbo
-rw-r–r– 1 root root 936 Apr 23 20:57 BB-UART2-RTSCTS-00A0.dtbo
-rw-r–r– 1 root root 861 Apr 23 20:57 BB-UART2-00A0.dtbo
-rw-r–r– 1 root root 861 Apr 23 20:57 BB-UART1-00A0.dtbo
-rw-r–r– 1 root root 1185 Apr 23 20:57 BB-SPIDEV1A1-00A0.dtbo
-rw-r–r– 1 root root 1185 Apr 23 20:57 BB-SPIDEV1-00A0.dtbo
-rw-r–r– 1 root root 1185 Apr 23 20:57 BB-SPIDEV0-00A0.dtbo
-rw-r–r– 1 root root 952 Apr 23 20:57 BB-I2C1A1-00A0.dtbo
-rw-r–r– 1 root root 938 Apr 23 20:57 BB-I2C1-00A0.dtbo
-rw-r–r– 1 root root 1331 Apr 23 20:57 BB-GPIOHELP-00A0.dtbo
-rw-r–r– 1 root root 865 Apr 23 20:57 BB-BONE-SERL-03-00A1.dtbo
-rw-r–r– 1 root root 875 Apr 23 20:57 BB-BONE-SERL-01-00A1.dtbo
-rw-r–r– 1 root root 1198 Apr 23 20:57 BB-BONE-RTC-00A0.dtbo
-rw-r–r– 1 root root 675 Apr 23 20:57 BB-BONE-RST2-00A0.dtbo
-rw-r–r– 1 root root 1758 Apr 23 20:57 BB-BONE-RST-00A0.dtbo
-rw-r–r– 1 root root 853 Apr 23 20:57 BB-BONE-RS232-00A0.dtbo
-rw-r–r– 1 root root 1283 Apr 23 20:57 BB-BONE-PWMT-00A0.dtbo
-rw-r–r– 1 root root 3014 Apr 23 20:57 BB-BONE-PRU-04-00A0.dtbo
-rw-r–r– 1 root root 2387 Apr 23 20:57 BB-BONE-PRU-03-00A0.dtbo
-rw-r–r– 1 root root 1405 Apr 23 20:57 BB-BONE-PRU-02-00A0.dtbo
-rw-r–r– 1 root root 998 Apr 23 20:57 BB-BONE-PRU-01-00A0.dtbo
-rw-r–r– 1 root root 1158 Apr 23 20:57 BB-BONELT-BT-00A0.dtbo
-rw-r–r– 1 root root 6033 Apr 23 20:57 BB-BONE-LCD7-01-00A4.dtbo
-rw-r–r– 1 root root 6011 Apr 23 20:57 BB-BONE-LCD7-01-00A3.dtbo
-rw-r–r– 1 root root 5981 Apr 23 20:57 BB-BONE-LCD7-01-00A2.dtbo
-rw-r–r– 1 root root 5857 Apr 23 20:57 BB-BONE-LCD4-01-00A1.dtbo
-rw-r–r– 1 root root 3634 Apr 23 20:57 BB-BONE-LCD4-01-00A0.dtbo
-rw-r–r– 1 root root 1284 Apr 23 20:57 BB-BONE-GPS-00A0.dtbo
-rw-r–r– 1 root root 1075 Apr 23 20:57 BB-BONE-GPEVT-00A0.dtbo
-rw-r–r– 1 root root 1266 Apr 23 20:57 BB-BONE-eMMC1-01-00A0.dtbo
-rw-r–r– 1 root root 2074 Apr 23 20:57 BB-BONE-CRYPTO-00A0.dtbo
-rw-r–r– 1 root root 3592 Apr 23 20:57 BB-BONE-CAM-VVDN-00A0.dtbo
-rw-r–r– 1 root root 3588 Apr 23 20:57 BB-BONE-CAM3-01-00A2.dtbo
-rw-r–r– 1 root root 4536 Apr 23 20:57 BB-BONE-BACONE2-00A0.dtbo
-rw-r–r– 1 root root 3259 Apr 23 20:57 BB-BONE-BACONE-00A0.dtbo
-rw-r–r– 1 root root 4273 Apr 23 20:57 BB-BONE-BACON-00A0.dtbo
-rw-r–r– 1 root root 2885 Apr 23 20:57 BB-BONE-AUDI-01-00A0.dtbo
-rw-r–r– 1 root root 1056 Apr 23 20:57 BB-ADC-00A0.dtbo
-rw-r–r– 1 root root 1181 Apr 23 20:57 am33xx_pwm-00A0.dtbo
-rw-r–r– 1 root root 865 Apr 23 21:02 ADAFRUIT-UART5-00A0.dtbo
-rw-r–r– 1 root root 865 Apr 23 21:02 ADAFRUIT-UART4-00A0.dtbo
-rw-r–r– 1 root root 865 Apr 23 21:02 ADAFRUIT-UART2-00A0.dtbo
-rw-r–r– 1 root root 865 Apr 23 21:02 ADAFRUIT-UART1-00A0.dtbo
-rw-r–r– 1 root root 1115 Apr 23 21:02 ADAFRUIT-SPI1-00A0.dtbo
-rw-r–r– 1 root root 1233 Apr 23 21:30 ADAFRUIT-SPI0-00A0.dts
-rw-r–r– 1 root root 1041 Apr 23 21:30 ADAFRUIT-SPI0-00A0.dtbo

Wish I knew that a few days ago…

Matlab rant

What the fuck is the difference between an array and a matrix anyway?

And why do they insist on using drivers for hardware made by companies like Microsoft, that intentionally limit the use of said drivers to their crock of shite operating system?!

I’m doing some work with an Xbox Kinect at the moment.

Basically, I had to faff about trying to get a license (legitimately of course) for their image acquisition toolbox, only to find out that the tool box will only use Microsoft’s own Kinect drivers…. Great, that means I have to develop on Matlab for windows. Triffic. Not only this, but these particular drivers will only work on the Kinect for Windows, which is EXACTLY the fucking same as an Xbox kinect but costs twice as much. WTF.

Having to develop on windows might not seem to bad, especially if you’re one of those windows loving retards out there, but it’s actually quite limiting. The algorithms i’m in the process of writing eventually need to be able to run on a very low power embedded computer, and if Matlab can only use a microsoft driver that only works with windows (Even if i was able to port it to another OS i doubt matlab would use it) then i’m limited to only being able to use SBC’s/SoM’s that use an X86/X64 architecture. Which i’d say cuts out about 70% of the market. Not only that, but the closed nature of microsoft makes it really hard to find help when you’re stuck with a problem, thats one reason developers use linux! All be it a minor reason.

So yeah, if you disagree with what i’ve written then i fully respect you’re opinion, even if it is completely wrong and you’re talking out of you’re ass.