4

The image is incorrect, unfortunately. The SPI pins are below: PB0 - #SS PB1 - SCK PB2 - MOSI PB3 - MISO


3

Your sampling rate is far too low for the signals you are looking at; you're not getting enough data points for drawing something that looks like the original signal. The Arduino library's analogRead(), while slow, can do better, up to about 9000 samples/s; the ADC in the atmega2560 in free-running mode can do about 75000 samples/s at 8 bits resolution. This ...


2

Functions must have a body. So instead of: void setup() You need: void setup() { // do nothing } You have other issues, for example this is not C++: int (n,i,j,result); That should be: int n,i,j,result; Also you are returning 0, when void functions don't return a value. Also, here: printf("enter N Value"); scanf ("%d", &...


2

Your problem is your usage of sizeof(). It doesn't do what you think it does. sizeof() gives you the amount of memory a variable takes up. It does not give you the number of elements in an array. For example: const int ONE[]={2,6}; sizeof(ONE) will not give you 2. It will give you 4. An int is two bytes in size (16 bits). An array of 2 ints is, therefore, ...


2

You can use them for any purpose other than PWM. You can even use them for PWM as long as the settings for the timer allow you to produce the waveform you want. The reason PWM broke was that you had changed the settings for the timer. The timer is what controls the PWM. When you changed those settings you either turned the PWM function off or set some ...


2

As Majenko already stated, the second image shows a custom display. It is not pixelated, because each shown element/symbol has it's own element in the LCD. When you have one of these displays, you might be able to reuse it for your project, but that is advanced. In the case of pixel based displays with a significantly higher resolution than the standard ...


1

What happens if the while condition fails? i.e. if millis() - time is greater than or equal to 20. Is this what you intended? If there's too much other stuff in the while loop, it may quit it and never re-enter it. loop() I've added a call to a function that prints debug information. unsigned long time = 0; void loop() { DebugMsgTime("loop() begin&...


1

thank you for your suggestion. The issue isn't with the code but was with the button. I changed the button and it worked fine. Thanks for the help!


1

Floats in the Arduino IDE are normally 4 bytes. So you can work out with a calculator that your matrix will take at least 15 x 15 x 4 bytes (900 bytes). That is out of a total of 2048 bytes of RAM on the Atmega32. That may seem to be enough RAM, but other things, like the libraries, will also take RAM. I did an answer to a question about RAM a while back. ...


1

As per the comments your output shows that the chip is working "normally" in that it reacts to the chip detector sketch. Thus the bulk of the design/implementation is OK. Referring to Engbedded Atmel AVR® Fuse Calculator your fuse settings means the processor is expecting an external crystal oscillator. The bootloader expects (I think) a 16 MHz ...


1

Hmm the solution is how the code is written...no fancy stuff...the KIWI way //in setup function add tft.fillScreen(ST7735_GREEN); void loop(){ int lightIntensity = myBH1750.getLux(); tft.setTextSize(3); tft.setCursor(10,10); tft.setTextColor(ST7735_RED); tft.print(lightIntensity); delay(3000); tft.setTextColor(ST7735_GREEN); tft.setCursor(...


1

If you define instance as a global value, how about to set callback with using lambda expression as variable of constructor. #include <ros.h> #include <std_msgs/Empty.h> class ROSController { protected: ros::Subscriber<std_msgs::Empty> sub; ros::NodeHandle nh; public: ROSController(void (*staticPRYCallback)(const std_msgs::...


1

I've got two arduinos, uno interfaced with mpu 6065 and 3 distance sensor working via i2c Protocol, the other Arduino is due interfaced with 17 scale weight. Eveey board works fine separately but when I tried to share data from uno to due through rx tx, I got scrambled data on due serial monitor , is there any solution? Thank you


Only top voted, non community-wiki answers of a minimum length are eligible