
Similar for the other variables you are trying to use. or whatever number value you want that variable to have depending on what pin you're actually talking about there. I was wondering in this piece of code that so wonderfully works,if I can set the clock frequency.And if yes how,because I modifed this code and used it for the ESP32 from Adafruit to input data as a MISO. Your code would need a line at the top that looks something like: int dir1PinL 2. It is my first post here,so excuse me for any mistakes. SPI.transfer((char)(EEPROM_address)) //send LSByte addressĭata = SPI.transfer(0xFF) //get data byteĭigitalWrite(SLAVESELECT,HIGH) //release chip, signal end transferĮeprom_output_data = read_eeprom(address) SPI.transfer((char)(address)) //send LSByte address in C++) or that has gone out of scope (in the case of arrays declared in. Try this modified code : #include įor (int I=0 I>8)) //send MSByte address first Cpp Segmentation FaultIts probably not the case, so you have an out-of-range. You are trying to configure the Atmega328p SPI register on the Arduino Zero, which can't work.Īrduino provide a SPI library that is doing all of the register's stuff.
