Things are starting to fall into place a little for me, I just had a look at the Arduino architecture and there is nothing really there as such, i think i am starting in the wrong place and not quite the correct hardware, I am wondering if there is an Arduino emulator for the PC and the Neopixel led strips and other sensors, i want to see things happening in real time and i dont see that can be done on the Arduino, but that would be possible through emulation, i could later attatch to the physical world , I also picked up a Pi4b and i have not really done anything with it yet, I am begining to wonder if i should have a go with this first because the architecture may be a little more familiar, I would welocome any comments ideas, i going to give C a look at right now, Regards
want to see things happening in real time and i dont see that can be done on the Arduino
Of course it can ! Well almost, it is a compiled program running, but it should not be hard to get started with a neopixel strip. You know you can use assembler within an arduino sketch. Actually coincidentally neopixel.h contains a fair bit of assembler because the timing is so sensitive, mainly for the slower boards, but if you open up neopixel.h and neopixel.cpp in notepad++ you can have a look at how it works.
Arduino IDE uses a C++ dialect, and C++ is programming language that gets compiled into a binary (actually assembler of course) specific to the Microprocessor of choice. This improves portability, but at the expense of efficiency at times (not always). But of course Assembler should remain available, but then the programmer needs to make sure the processor specific code is correct (if required). This is still the case but to a much lesser degree using the arduino core.
Thanks Deva that is a very good overview and i get you completely, i might try and port the code running on the Arduino to the PI4b just to see if i can the syntax and commands right, it should run on the 4b i am gueesing, i am not sure where the arduino ide puts the compiled code before you upload it to the Arduino device, i want to get that and have a look at it, be nice to dissasemble and see if i recognise anything, i think if i have a few opcodes to hand i will be able to start to get a grasp of things, The neo pixel is quite amazing when i think about it and i am looking forward to seeing how its adressed, i guess its going to be a bit like a bitmap screen which is no problem at all for me, i could stick a load together and make a big screen or something, the colour range is incredable, Regards
i am not sure where the arduino ide puts the compiled code before you upload it to the Arduino device,
Neither am i (i think it varies per core used) but you can chose 'Skecth -> Export compiled binary' and then in puts it in the sketch folder.
nice tip, thank you
mrroosty:
i am not sure where the arduino ide puts the compiled code before you upload it to the Arduino device, i want to get that and have a look at it, be nice to dissasemble and see if i recognise anything, i think if i have a few opcodes to hand i will be able to start to get a grasp of things,
What problem are you trying to solve by doing that? The source code Neopixel driver libraries is already available to you. And, if you look at the code for for higher-end processors in the Arduino ecosystem (Teensy 3.2, ESP8266), assembly code isn't even needed / used. It's all done in C++. No opcode knowledge is required to grasp how they work.
Also, PI4b may not be as suitable platform for NeoPixel work. Since Linux isn't a real-time environment, it may not support the tight timing required.
EDIT:
Also, you can download the datasheet for the LEDs here: http://www.szledcolor.com/download/SK6812%20LED.pdf
That provides the timing requirements.
Hi gfvalvo i cant do high level languages because i have never learned any, i program in Hex usually but any assembler would be a good start, i dont understand the cut and paste programming and all the syntax and spaces and commas and brackets and stuff, it looks like word processing to me and i am dislexic, opp codes and memory locations and hardware registers is the easy way for me, Thanks for the post, Regards
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.