I have been trying to program an Arduino on and off over the last few months and it is now at the stage it has to be working for next week!
The Arduino was nearly thrown on the floor yesterday and stamped on. I decide this morning to go in and be positive; but it only lasted about two hours before I was so frustrated again that it nearly went in the bin. I was sooooo close but then I changed a few things and could not get back to the nearly working code. Later I found that the Python consul was playing up but I had made to many changes by then. I know nothing about Python either but am learning about “indents” Why do indents matter?
Do you know what my main problem is? Variables “you can not use a char * as a char”; you can not convert a const char to a char", “you can not convert whatever to a string”. Why is it so complicated - within reason in php and I am told Python it does not matter what type a variable is.
Anyway enough moaning for now as I may have to add a Raspberry pie to the Arduino as well
It sounds like you may be lacking experience with “strictly typed” languages such as C or Java ?
PHP is “loosely typed” which in some ways can be a good thing, and in other ways not so much.
eg. it can make writing code a bit easier, but it can make tracking down elusive Bugs a lot harder.
As for indentation, that’s syntax. Some might prefer languages that use curly braces to define code blocks, some like not having to use them and prefer indentation.
If you’re stuck working with it I guess you have little choice but to use it’s syntax like it or not.
(But venting can help some )
Yes I mostly use php and other website languages and I believe the Arduino code is based on C.
At work nobody likes using C; although I am told it processes data fast.
There is one guy at work who can help me but he is currently on holiday and I do not like to keep asking him as he is overworked as well.
I think I have also created myself a hardware problem; possibly with floating voltages. Again they were OK a couple of weeks ago but not when I connected the Arduino up this time Anyway another job for tomorrow.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.